diff --git a/libvo/vo_x11.c b/libvo/vo_x11.c index 05adbace24..1e9f8b98e0 100644 --- a/libvo/vo_x11.c +++ b/libvo/vo_x11.c @@ -424,11 +424,11 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, 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 --git a/libvo/vo_xmga.c b/libvo/vo_xmga.c index abf37b3bff..bec59d13a3 100644 --- a/libvo/vo_xmga.c +++ b/libvo/vo_xmga.c @@ -238,13 +238,13 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, 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 --git a/libvo/vo_xv.c b/libvo/vo_xv.c index b50f1001e3..7e7a4655f5 100644 --- a/libvo/vo_xv.c +++ b/libvo/vo_xv.c @@ -348,15 +348,14 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, 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 --git a/libvo/vo_xvidix.c b/libvo/vo_xvidix.c index 2bef97e594..5e4e9059b4 100644 --- a/libvo/vo_xvidix.c +++ b/libvo/vo_xvidix.c @@ -367,13 +367,13 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, 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 --git a/libvo/vo_xvmc.c b/libvo/vo_xvmc.c index d8e464ded8..bb0995a43d 100644 --- a/libvo/vo_xvmc.c +++ b/libvo/vo_xvmc.c @@ -701,6 +701,7 @@ found_subpic: 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 @@ found_subpic: } 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 --git a/libvo/x11_common.c b/libvo/x11_common.c index 9faeb741b8..199992eeac 100644 --- a/libvo/x11_common.c +++ b/libvo/x11_common.c @@ -1512,6 +1512,8 @@ void vo_x11_fullscreen(void) 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); }