[Mplayer-cvslog] CVS: main/libvo x11_common.c,1.166,1.167

Dominik 'Rathann' Mierzejewski dominik at rangers.eu.org
Fri Apr 2 14:09:49 CEST 2004


On Friday, 02 April 2004 at 08:05, Adam Tla/lka CVS wrote:
> CVS change done by Adam Tla/lka CVS
> 
> Update of /cvsroot/mplayer/main/libvo
> In directory mail:/var2/tmp/cvs-serv2531/libvo
> 
> Modified Files:
> 	x11_common.c 
> Log Message:
> win_gravity memorizing and restoring while switching fullscreen mode
> 
> 
> Index: x11_common.c
> ===================================================================
> RCS file: /cvsroot/mplayer/main/libvo/x11_common.c,v
> retrieving revision 1.166
> retrieving revision 1.167
> diff -u -r1.166 -r1.167
> --- x11_common.c	1 Apr 2004 20:59:07 -0000	1.166
> +++ x11_common.c	2 Apr 2004 06:05:54 -0000	1.167
> @@ -59,6 +59,7 @@
>   
>  int fs_layer=WIN_LAYER_ABOVE_DOCK;
>  static int orig_layer=0;
> +static int old_gravity = NorthWestGravity;
>  
>  int stop_xscreensaver=0;
>  
> @@ -620,7 +621,6 @@
>    if(vo_fsmode&8){
>      XSetTransientForHint (vo_Display, w, RootWindow(vo_Display,mScreen));
>    }
> -
>   vo_MotifHints=XInternAtom( vo_Display,"_MOTIF_WM_HINTS",0 );
>   if ( vo_MotifHints != None )
>    {

Again! Cosmetics mixed with code updates.

> @@ -810,6 +810,10 @@
>  	    XFree( name );
>  	   }
>  	   break;
> +      case MapNotify:
> +		vo_hint.win_gravity = old_gravity;
> +		XSetWMNormalHints( mDisplay,vo_window,&vo_hint );
> +	   break;
>       }
>    }
>    return ret;

Identation not preserved.

> @@ -817,7 +821,8 @@
>  
>  void vo_x11_sizehint( int x, int y, int width, int height, int max )
>  {
> - vo_hint.flags=PPosition | PSize | PWinGravity;
> +   vo_hint.flags=PPosition | PSize | PWinGravity;
> +
>   if(vo_x11_keepaspect)
>   {
>   	vo_hint.flags |= PAspect;

Cosmetics!

> @@ -839,7 +844,7 @@
>   vo_hint.min_width = vo_hint.min_height = 4; 
>   vo_hint.flags |= PMinSize;
>  
> - vo_hint.win_gravity=StaticGravity;
> + vo_hint.win_gravity= StaticGravity;
>   XSetWMNormalHints( mDisplay,vo_window,&vo_hint );
>  }
>  

As above.

> @@ -1066,16 +1071,25 @@
>     vo_fs=VO_TRUE;
>     vo_old_x=vo_dx; vo_old_y=vo_dy; vo_old_width=vo_dwidth; vo_old_height=vo_dheight;
>     x=0; y=0; w=vo_screenwidth; h=vo_screenheight;
> + 
> + }
> + {
> +	long dummy;
> +	XGetWMNormalHints(mDisplay, vo_window, &vo_hint, &dummy);
> +	if (!(vo_hint.flags & PWinGravity))
> +		old_gravity = NorthWestGravity;
> +	else
> +		old_gravity = vo_hint.win_gravity;
>   }
>   vo_x11_decoration( mDisplay,vo_window,(vo_fs) ? 0 : 1 );
> - vo_x11_sizehint( x,y,w,h,0 );
> + vo_x11_sizehint( x,y,w,h,0);
>   vo_x11_setlayer( mDisplay,vo_window,vo_fs );
>  
>   if ((!(vo_fs)) & vo_ontop) vo_x11_setlayer(mDisplay, vo_window,vo_ontop);
>  
> - if(vo_wm_type==0 && !(vo_fsmode&16))
> +if(vo_wm_type==0 && !(vo_fsmode&16))
>  //    XUnmapWindow( mDisplay,vo_window );  // required for MWM
> -      XWithdrawWindow(mDisplay,vo_window,mScreen);
> +     XWithdrawWindow(mDisplay,vo_window,mScreen);
>   XMoveResizeWindow( mDisplay,vo_window,x,y,w,h );
>  #ifdef HAVE_XINERAMA
>   vo_x11_xinerama_move(mDisplay,vo_window);


Cosmetics mixed with code updates.

Why can't you follow patches.txt and cvs-howto.txt?

-- 
MPlayer RPMs maintainer: http://greysector.rangers.eu.org/mplayer.html
"The Universe doesn't give you any points for doing things that are easy."
        -- Sheridan to Garibaldi in Babylon 5:"The Geometry of Shadows"




More information about the MPlayer-cvslog mailing list