[MPlayer-cvslog] r18718 - in trunk/libvo: vo_x11.c vo_xmga.c vo_xv.c vo_xvidix.c vo_xvmc.c x11_common.c

reimar subversion at mplayerhq.hu
Thu Jun 15 10:00:38 CEST 2006


Author: reimar
Date: Thu Jun 15 10:00:37 2006
New Revision: 18718

Modified:
   trunk/libvo/vo_x11.c
   trunk/libvo/vo_xmga.c
   trunk/libvo/vo_xv.c
   trunk/libvo/vo_xvidix.c
   trunk/libvo/vo_xvmc.c
   trunk/libvo/x11_common.c

Log:
Fix window position when changing videos while in fullscreen and for
window managers that modify position on Map. Oked by Alexander Strasser.


Modified: trunk/libvo/vo_x11.c
==============================================================================
--- trunk/libvo/vo_x11.c	(original)
+++ trunk/libvo/vo_x11.c	Thu Jun 15 10:00:37 2006
@@ -424,11 +424,11 @@
                 while (xev.type != MapNotify
                        || xev.xmap.event != vo_window);
 
+                vo_x11_nofs_sizepos(vo_dx, vo_dy, vo_dwidth, vo_dheight);
                 if (fullscreen)
                     vo_x11_fullscreen();
-            } else if (!fullscreen)
-                XMoveResizeWindow(mDisplay, vo_window, vo_dx, vo_dy,
-                                  vo_dwidth, vo_dheight);
+            } else
+                vo_x11_nofs_sizepos(vo_dx, vo_dy, vo_dwidth, vo_dheight);
         }
 
         XSync(mDisplay, False);

Modified: trunk/libvo/vo_xmga.c
==============================================================================
--- trunk/libvo/vo_xmga.c	(original)
+++ trunk/libvo/vo_xmga.c	Thu Jun 15 10:00:37 2006
@@ -238,13 +238,13 @@
 
                 XStoreName(mDisplay, vo_window, mTitle);
                 XMapWindow(mDisplay, vo_window);
+                vo_x11_nofs_sizepos(vo_dx, vo_dy, vo_dwidth, vo_dheight);
 
                 if (flags & VOFLAG_FULLSCREEN)
                     vo_x11_fullscreen();
 
-            } else if (!(flags & VOFLAG_FULLSCREEN))
-                XMoveResizeWindow(mDisplay, vo_window, vo_dx, vo_dy,
-                                  vo_dwidth, vo_dheight);
+            } else
+                vo_x11_nofs_sizepos(vo_dx, vo_dy, vo_dwidth, vo_dheight);
         }
 
         if (vo_gc != None)

Modified: trunk/libvo/vo_xv.c
==============================================================================
--- trunk/libvo/vo_xv.c	(original)
+++ trunk/libvo/vo_xv.c	Thu Jun 15 10:00:37 2006
@@ -348,15 +348,14 @@
                                    NULL, 0, &hint);
             vo_x11_sizehint(hint.x, hint.y, hint.width, hint.height, 0);
             XMapWindow(mDisplay, vo_window);
+            vo_x11_nofs_sizepos(hint.x, hint.y, hint.width, hint.height);
             if (flags & VOFLAG_FULLSCREEN)
                 vo_x11_fullscreen();
         } else
         {
             // vo_fs set means we were already at fullscreen
             vo_x11_sizehint(hint.x, hint.y, hint.width, hint.height, 0);
-            if (!vo_fs)
-                XMoveResizeWindow(mDisplay, vo_window, hint.x, hint.y,
-                                  hint.width, hint.height);
+            vo_x11_nofs_sizepos(hint.x, hint.y, hint.width, hint.height);
             if (flags & VOFLAG_FULLSCREEN && !vo_fs)
                 vo_x11_fullscreen();    // handle -fs on non-first file
         }

Modified: trunk/libvo/vo_xvidix.c
==============================================================================
--- trunk/libvo/vo_xvidix.c	(original)
+++ trunk/libvo/vo_xvidix.c	Thu Jun 15 10:00:37 2006
@@ -367,13 +367,13 @@
 
                 XStoreName(mDisplay, vo_window, title);
                 XMapWindow(mDisplay, vo_window);
+                vo_x11_nofs_sizepos(vo_dx, vo_dy, vo_dwidth, vo_dheight);
 
                 if (flags & VOFLAG_FULLSCREEN)
                     vo_x11_fullscreen();
 
-            } else if (!(flags & VOFLAG_FULLSCREEN))
-                XMoveResizeWindow(mDisplay, vo_window, vo_dx, vo_dy,
-                                  vo_dwidth, vo_dheight);
+            } else
+                vo_x11_nofs_sizepos(vo_dx, vo_dy, vo_dwidth, vo_dheight);
         }
 
         if (vo_gc != None)

Modified: trunk/libvo/vo_xvmc.c
==============================================================================
--- trunk/libvo/vo_xvmc.c	(original)
+++ trunk/libvo/vo_xvmc.c	Thu Jun 15 10:00:37 2006
@@ -701,6 +701,7 @@
          XSetStandardProperties(mDisplay, vo_window, hello, hello, None, NULL, 0, &hint);
          XSetWMNormalHints( mDisplay,vo_window,&hint );
 	 XMapWindow(mDisplay, vo_window);
+	 vo_x11_nofs_sizepos(hint.x, hint.y, hint.width, hint.height);
 	 if ( flags&VOFLAG_FULLSCREEN ) vo_x11_fullscreen();
 	 else {
 	    vo_x11_sizehint( hint.x, hint.y, hint.width, hint.height,0 );
@@ -708,7 +709,7 @@
       } else {
 	// vo_fs set means we were already at fullscreen
 	 vo_x11_sizehint( hint.x, hint.y, hint.width, hint.height,0 );
-	 if ( !vo_fs ) XMoveResizeWindow( mDisplay,vo_window,hint.x,hint.y,hint.width,hint.height );
+	 vo_x11_nofs_sizepos(hint.x, hint.y, hint.width, hint.height);
 	 if ( flags&VOFLAG_FULLSCREEN && !vo_fs ) vo_x11_fullscreen(); // handle -fs on non-first file
       }
 

Modified: trunk/libvo/x11_common.c
==============================================================================
--- trunk/libvo/x11_common.c	(original)
+++ trunk/libvo/x11_common.c	Thu Jun 15 10:00:37 2006
@@ -1512,6 +1512,8 @@
         vo_x11_setlayer(mDisplay, vo_window, vo_ontop);
 
     XMapRaised(mDisplay, vo_window);
+    if ( ! (vo_fs_type & vo_wm_FULLSCREEN) ) // some WMs change window pos on map
+        XMoveResizeWindow(mDisplay, vo_window, x, y, w, h);
     XRaiseWindow(mDisplay, vo_window);
     XFlush(mDisplay);
 }



More information about the MPlayer-cvslog mailing list