summaryrefslogtreecommitdiffstats
path: root/libvo
diff options
context:
space:
mode:
authorrathann <rathann@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-04-03 13:41:23 +0000
committerrathann <rathann@b3059339-0415-0410-9bf9-f77b7e298cf2>2004-04-03 13:41:23 +0000
commit3813c685162d9c054b57b9431ebebc2c107e623c (patch)
tree7b774eadf966597a6b0250e84a9bc82ae1a53b07 /libvo
parent0b7f6c6b3c344957276fdacc67e51b4c534ca7e0 (diff)
downloadmpv-3813c685162d9c054b57b9431ebebc2c107e623c.tar.bz2
mpv-3813c685162d9c054b57b9431ebebc2c107e623c.tar.xz
- win_gravity memorizing and restoring while switching fullscreen mode (by Adam Tla/lka)
- recommited without cosmetic changes (by me) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12112 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo')
-rw-r--r--libvo/x11_common.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/libvo/x11_common.c b/libvo/x11_common.c
index 6647ef8ae3..112c08e89d 100644
--- a/libvo/x11_common.c
+++ b/libvo/x11_common.c
@@ -59,6 +59,7 @@
int fs_layer=WIN_LAYER_ABOVE_DOCK;
static int orig_layer=0;
+static int old_gravity = NorthWestGravity;
int stop_xscreensaver=0;
@@ -810,6 +811,10 @@ int vo_x11_check_events(Display *mydisplay){
XFree( name );
}
break;
+ case MapNotify:
+ vo_hint.win_gravity = old_gravity;
+ XSetWMNormalHints( mDisplay,vo_window,&vo_hint );
+ break;
}
}
return ret;
@@ -1066,6 +1071,15 @@ void vo_x11_fullscreen( void )
vo_fs=VO_TRUE;
vo_old_x=vo_dx; vo_old_y=vo_dy; vo_old_width=vo_dwidth; vo_old_height=vo_dheight;
x=0; y=0; w=vo_screenwidth; h=vo_screenheight;
+
+ }
+ {
+ long dummy;
+ XGetWMNormalHints(mDisplay, vo_window, &vo_hint, &dummy);
+ if (!(vo_hint.flags & PWinGravity))
+ old_gravity = NorthWestGravity;
+ else
+ old_gravity = vo_hint.win_gravity;
}
vo_x11_decoration( mDisplay,vo_window,(vo_fs) ? 0 : 1 );
vo_x11_sizehint( x,y,w,h,0 );