Mercurial > mplayer.hg
comparison libvo/x11_common.c @ 12111:8e31aacc3e81
- win_gravity memorizing and restoring while switching fullscreen mode (by Adam Tla/lka)
- recommited without cosmetic changes (by me)
author | rathann |
---|---|
date | Sat, 03 Apr 2004 13:41:23 +0000 |
parents | 54514e4733a1 |
children | 8520e39f92d6 |
comparison
equal
deleted
inserted
replaced
12110:a34dc5a369ca | 12111:8e31aacc3e81 |
---|---|
57 #define WIN_LAYER_ONTOP 6 | 57 #define WIN_LAYER_ONTOP 6 |
58 #define WIN_LAYER_ABOVE_DOCK 10 | 58 #define WIN_LAYER_ABOVE_DOCK 10 |
59 | 59 |
60 int fs_layer=WIN_LAYER_ABOVE_DOCK; | 60 int fs_layer=WIN_LAYER_ABOVE_DOCK; |
61 static int orig_layer=0; | 61 static int orig_layer=0; |
62 static int old_gravity = NorthWestGravity; | |
62 | 63 |
63 int stop_xscreensaver=0; | 64 int stop_xscreensaver=0; |
64 | 65 |
65 static int dpms_disabled=0; | 66 static int dpms_disabled=0; |
66 static int timeout_save=0; | 67 static int timeout_save=0; |
808 // fprintf(stderr,"[ws] PropertyNotify ( 0x%x ) %s ( 0x%x )\n",vo_window,name,Event.xproperty.atom ); | 809 // fprintf(stderr,"[ws] PropertyNotify ( 0x%x ) %s ( 0x%x )\n",vo_window,name,Event.xproperty.atom ); |
809 | 810 |
810 XFree( name ); | 811 XFree( name ); |
811 } | 812 } |
812 break; | 813 break; |
814 case MapNotify: | |
815 vo_hint.win_gravity = old_gravity; | |
816 XSetWMNormalHints( mDisplay,vo_window,&vo_hint ); | |
817 break; | |
813 } | 818 } |
814 } | 819 } |
815 return ret; | 820 return ret; |
816 } | 821 } |
817 | 822 |
1064 (vo_dwidth==vo_screenwidth && vo_dwidth!=vo_old_width) && | 1069 (vo_dwidth==vo_screenwidth && vo_dwidth!=vo_old_width) && |
1065 (vo_dheight==vo_screenheight && vo_dheight!=vo_old_height) ) return; | 1070 (vo_dheight==vo_screenheight && vo_dheight!=vo_old_height) ) return; |
1066 vo_fs=VO_TRUE; | 1071 vo_fs=VO_TRUE; |
1067 vo_old_x=vo_dx; vo_old_y=vo_dy; vo_old_width=vo_dwidth; vo_old_height=vo_dheight; | 1072 vo_old_x=vo_dx; vo_old_y=vo_dy; vo_old_width=vo_dwidth; vo_old_height=vo_dheight; |
1068 x=0; y=0; w=vo_screenwidth; h=vo_screenheight; | 1073 x=0; y=0; w=vo_screenwidth; h=vo_screenheight; |
1074 | |
1075 } | |
1076 { | |
1077 long dummy; | |
1078 XGetWMNormalHints(mDisplay, vo_window, &vo_hint, &dummy); | |
1079 if (!(vo_hint.flags & PWinGravity)) | |
1080 old_gravity = NorthWestGravity; | |
1081 else | |
1082 old_gravity = vo_hint.win_gravity; | |
1069 } | 1083 } |
1070 vo_x11_decoration( mDisplay,vo_window,(vo_fs) ? 0 : 1 ); | 1084 vo_x11_decoration( mDisplay,vo_window,(vo_fs) ? 0 : 1 ); |
1071 vo_x11_sizehint( x,y,w,h,0 ); | 1085 vo_x11_sizehint( x,y,w,h,0 ); |
1072 vo_x11_setlayer( mDisplay,vo_window,vo_fs ); | 1086 vo_x11_setlayer( mDisplay,vo_window,vo_fs ); |
1073 | 1087 |