[MPlayer-dev-eng] [PATCH] Set USPosition/USSize in WM_NORMAL_HINTS when passed -geometry

Ciaran Anscomb ciarana at rd.bbc.co.uk
Thu Sep 14 22:10:37 CEST 2006


Attached is a tiny patch against 1.0pre8 that affects X11 video output
drivers such that they set USPosition instead of PPosition and USSize
instead of PSize if the user specifies these with the -geometry
switch.

US* is supposed to be set if the size provided was specified by the
user, P* if set by the program.

..ciaran
-- 
The JKL assassin droid enters.  Laser blasts.  You are dead.
-------------- next part --------------
diff -ru MPlayer-1.0pre8-old/libvo/x11_common.c MPlayer-1.0pre8/libvo/x11_common.c
--- MPlayer-1.0pre8-old/libvo/x11_common.c	2006-06-11 19:35:43.000000000 +0100
+++ MPlayer-1.0pre8/libvo/x11_common.c	2006-09-14 20:25:24.000000000 +0100
@@ -1177,7 +1177,10 @@
 
 void vo_x11_sizehint(int x, int y, int width, int height, int max)
 {
-    vo_hint.flags = PPosition | PSize | PWinGravity;
+    vo_hint.flags = PWinGravity;
+    vo_hint.flags |= geometry_xy_changed ? USPosition : PPosition;
+    vo_hint.flags |= geometry_wh_changed ? USSize : PSize;
+
     if (vo_keepaspect)
     {
         vo_hint.flags |= PAspect;


More information about the MPlayer-dev-eng mailing list