[MPlayer-dev-eng] [PATCH] x11 vo drivers override user settings for window placement

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Mon Jul 9 15:11:31 CEST 2007


Hello,
On Mon, Jul 09, 2007 at 01:48:14PM +0200, Attila Kinali wrote:
> On Sun, 24 Jun 2007 12:03:24 -0700
> "Mark Tiefenbruck" <mark at fluxbox.org> wrote:
> 
> > First of all, since you're setting the size hint, the only reason to
> > move the window at all is in case there isn't a window manager
> > running. While that probably happens more often for a video player
> > than most applications, I'd still wager it's pretty rare. However, you
> > don't have to give up on that case to resolve this. You can just move
> > the window before mapping it. I've supplied a patch to do just that,
> > and it works. Oh, and it also makes the gl2 driver set the size hint
> > before mapping -- that's pretty important.
> 
> Did we reach any resolution about this issue?

No, but maybe everyone can test attached patch and comment what they
like or don't like about it.

Greetings,
Reimar Döffinger
-------------- next part --------------
Index: libvo/x11_common.c
===================================================================
--- libvo/x11_common.c	(revision 23744)
+++ libvo/x11_common.c	(working copy)
@@ -1173,6 +1173,7 @@
   {
    vo_dwidth = width;
    vo_dheight = height;
+   if (vo_window != None)
    XMoveResizeWindow(mDisplay, vo_window, x, y, width, height);
   }
 }
@@ -1286,6 +1287,7 @@
                              Colormap col_map,
                              const char *classname, const char *title)
 {
+  vo_x11_nofs_sizepos(vo_dx, vo_dy, width, height);
   if (vo_window == None) {
     XSizeHints hint;
     XEvent xev;
@@ -1317,7 +1319,6 @@
           ButtonPressMask | ButtonReleaseMask | ExposureMask);
   }
   if (vo_ontop) vo_x11_setlayer(mDisplay, vo_window, vo_ontop);
-  vo_x11_nofs_sizepos(vo_dx, vo_dy, width, height);
   if (!!vo_fs != !!(flags & VOFLAG_FULLSCREEN))
     vo_x11_fullscreen();
 }


More information about the MPlayer-dev-eng mailing list