changeset 1266:9e1b353f8171

switch fullscreen method with -fsmode
author arpi
date Tue, 03 Jul 2001 23:23:55 +0000
parents f1f35276f635
children ac5c8926a2d6
files libvo/x11_common.c
diffstat 1 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/x11_common.c	Tue Jul 03 23:22:29 2001 +0000
+++ b/libvo/x11_common.c	Tue Jul 03 23:23:55 2001 +0000
@@ -182,8 +182,17 @@
 static MotifWmHints   vo_MotifWmHints;
 static Atom           vo_MotifHints  = None;
 
+// Note: always d==0 !
 void vo_x11_decoration( Display * vo_Display,Window w,int d )
 {
+
+  if(vo_fsmode&1){
+    XSetWindowAttributes attr;
+    attr.override_redirect = True;
+    XChangeWindowAttributes(vo_Display, w, CWOverrideRedirect, &attr);
+//    XMapWindow(vo_Display], w);
+  }
+
  vo_MotifHints=XInternAtom( vo_Display,"_MOTIF_WM_HINTS",0 );
  if ( vo_MotifHints != None )
   {
@@ -191,9 +200,9 @@
    vo_MotifWmHints.flags=MWM_HINTS_FUNCTIONS | MWM_HINTS_DECORATIONS;
    vo_MotifWmHints.functions=MWM_FUNC_MOVE | MWM_FUNC_CLOSE | MWM_FUNC_MINIMIZE | MWM_FUNC_MAXIMIZE;
    if ( d ) d=MWM_DECOR_ALL;
-   vo_MotifWmHints.decorations=d | MWM_DECOR_MENU;
+   vo_MotifWmHints.decorations=d|((vo_fsmode&2)?0:MWM_DECOR_MENU);
    XChangeProperty( vo_Display,w,vo_MotifHints,vo_MotifHints,32,
-                    PropModeReplace,(unsigned char *)&vo_MotifWmHints,5 );
+                    PropModeReplace,(unsigned char *)&vo_MotifWmHints,(vo_fsmode&4)?4:5 );
   }
 }