# HG changeset patch # User reimar # Date 1150358437 0 # Node ID 30d7ddf08889869c63e2e1fa2aa0c1d579d11c84 # Parent 8fc996a3b4e1f2db69f2ffb3b105bf96dfa183c7 Fix window position when changing videos while in fullscreen and for window managers that modify position on Map. Oked by Alexander Strasser. diff -r 8fc996a3b4e1 -r 30d7ddf08889 libvo/vo_x11.c --- a/libvo/vo_x11.c Wed Jun 14 22:22:34 2006 +0000 +++ b/libvo/vo_x11.c Thu Jun 15 08:00:37 2006 +0000 @@ -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); diff -r 8fc996a3b4e1 -r 30d7ddf08889 libvo/vo_xmga.c --- a/libvo/vo_xmga.c Wed Jun 14 22:22:34 2006 +0000 +++ b/libvo/vo_xmga.c Thu Jun 15 08:00:37 2006 +0000 @@ -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) diff -r 8fc996a3b4e1 -r 30d7ddf08889 libvo/vo_xv.c --- a/libvo/vo_xv.c Wed Jun 14 22:22:34 2006 +0000 +++ b/libvo/vo_xv.c Thu Jun 15 08:00:37 2006 +0000 @@ -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 } diff -r 8fc996a3b4e1 -r 30d7ddf08889 libvo/vo_xvidix.c --- a/libvo/vo_xvidix.c Wed Jun 14 22:22:34 2006 +0000 +++ b/libvo/vo_xvidix.c Thu Jun 15 08:00:37 2006 +0000 @@ -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) diff -r 8fc996a3b4e1 -r 30d7ddf08889 libvo/vo_xvmc.c --- a/libvo/vo_xvmc.c Wed Jun 14 22:22:34 2006 +0000 +++ b/libvo/vo_xvmc.c Thu Jun 15 08:00:37 2006 +0000 @@ -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 } diff -r 8fc996a3b4e1 -r 30d7ddf08889 libvo/x11_common.c --- a/libvo/x11_common.c Wed Jun 14 22:22:34 2006 +0000 +++ b/libvo/x11_common.c Thu Jun 15 08:00:37 2006 +0000 @@ -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); }