[MPlayer-dev-eng] [PATCH] 2-Win Fullscreen new method + fixes for virtual desktop + application changing

Adam Tla/lka atlka at pg.gda.pl
Wed Jul 28 08:08:47 CEST 2004


What is wrong with previous approach?

normal->fullscreen
1. memorize x,y,w,h,bw,gravity,decoration state (xa_wm_motif_hints)
2. unmap window
3. set StaticGravity
4. remove window decorations
5. set border_width to 0 (or better have it set to 0 all the time)
6. moveresize to 0,0,maxw,maxh
7. map window
8. wait for MapNotify event

fullscreen->normal
1. unmap window
2. moveresize to xmem,ymem,wmem,hmem,bwmem
3. restore decoration state (xa_wm_motif_hints)
4. map window
5. wait for MapNotify event
6. restore gravity

memorized gravity is restored after MapNotify event to prevent incorect
positioning. If WM supports this we could do all this stuff just by
asking WM to do it. It is the proper way.

I am thinking that we could manually do this without unmapping window
but we get more window redraws.

normal->fullscreen
1. memorize x,y,w,h,bw,gravity,decoration state (xa_wm_motif_hints)
2. set StaticGravity
3. set border_width to 0 (or better have it set to 0 all the time)
4. moveresize to 0,0,maxw,maxh
5. remove window decorations
6. wait for ConfigureNotify event


fullscreen->normal
1. restore decoration state (xa_wm_motif_hints)
2. moveresize to xmem,ymem,wmem,hmem,bwmem
5. wait for ConfigureNotify event
6. restore gravity

Optimizations: 
* border_with always set to 0 - no need to set or memorize it,
* decorations behind screen area are invisible so we could forget
  about decoration state memorizing/resorting.

Hmm, I must test this logic ;-).

Regards
-- 
Adam Tla/lka      mailto:atlka at pg.gda.pl    ^v^ ^v^ ^v^
System  & Network Administration Group           ~~~~~~
Computer Center,  Gdansk University of Technology, Poland
PGP public key:   finger atlka at sunrise.pg.gda.pl




More information about the MPlayer-dev-eng mailing list