tags 434243 + patch
thanks

OoO Peu avant  le début de l'après-midi du samedi  27 octobre 2007, vers
13:03, je disais:

> Second, I  use fvwm.  Without  Xinerama, vlc is  able to do  full screen
> without a  problem. With Xinerama, I  still get the  title bar.  Without
> Xinerama,  the title  bar  is  present but  hidden  (not visible).  With
> Xinerama, I suppose the title bar is visible because the window is first
> created, then moved (xcommon.c:1656).

> Moreover, the  window has no title,  no class, no resource  name.  It is
> therefore not easy  to ask the window manager to hide  title bar. I have
> tried to set  option 'video-title' with no luck (I  have tried with both
> video-deco equal to  1 and to 0). The block  at xcommon.c:1109 should be
> executed even when we are using fullscreen mode (and even if there is no
> decoration). The no-decoration part too.

Here is a patch that makes me happy with this point:

diff -Naur vlc-0.8.6.c/modules/video_output/x11/xcommon.c vlc-0.8.6.c.new/modules/video_output/x11/xcommon.c
--- vlc-0.8.6.c/modules/video_output/x11/xcommon.c	2007-06-16 16:25:11.000000000 +0200
+++ vlc-0.8.6.c.new/modules/video_output/x11/xcommon.c	2007-10-27 13:42:58.000000000 +0200
@@ -1079,54 +1079,52 @@
                            &xwindow_attributes );
 
         if( !p_vout->b_fullscreen )
-        {
-            /* Set window manager hints and properties: size hints, command,
-             * window's name, and accepted protocols */
-            XSetWMNormalHints( p_vout->p_sys->p_display,
-                               p_win->base_window, &xsize_hints );
-            XSetCommand( p_vout->p_sys->p_display, p_win->base_window,
-                         p_vout->p_vlc->ppsz_argv, p_vout->p_vlc->i_argc );
-
-            if( !var_GetBool( p_vout, "video-deco") )
-            {
-                Atom prop;
-                mwmhints_t mwmhints;
-
-                mwmhints.flags = MWM_HINTS_DECORATIONS;
-                mwmhints.decorations = False;
-
-                prop = XInternAtom( p_vout->p_sys->p_display, "_MOTIF_WM_HINTS",
-                                    False );
-
-                XChangeProperty( p_vout->p_sys->p_display,
-                                 p_win->base_window,
-                                 prop, prop, 32, PropModeReplace,
-                                 (unsigned char *)&mwmhints,
-                                 PROP_MWM_HINTS_ELEMENTS );
-            }
-            else
-            {
-                 var_Get( p_vout, "video-title", &val );
-                 if( !val.psz_string || !*val.psz_string )
-                 {
-                    XStoreName( p_vout->p_sys->p_display, p_win->base_window,
+	{
+	    /* Set window manager hints and properties: size hints, command,
+	     * window's name, and accepted protocols */
+	    XSetWMNormalHints( p_vout->p_sys->p_display,
+			       p_win->base_window, &xsize_hints );
+	    XSetCommand( p_vout->p_sys->p_display, p_win->base_window,
+			 p_vout->p_vlc->ppsz_argv, p_vout->p_vlc->i_argc );
+	}
+	
+	var_Get( p_vout, "video-title", &val );
+	if( !val.psz_string || !*val.psz_string )
+	{
+	    XStoreName( p_vout->p_sys->p_display, p_win->base_window,
 #ifdef MODULE_NAME_IS_x11
-                                VOUT_TITLE " (X11 output)"
+			VOUT_TITLE " (X11 output)"
 #elif defined(MODULE_NAME_IS_glx)
-                                VOUT_TITLE " (GLX output)"
+			VOUT_TITLE " (GLX output)"
 #else
-                                VOUT_TITLE " (XVideo output)"
+			VOUT_TITLE " (XVideo output)"
 #endif
-                      );
-                }
-                else
-                {
-                    XStoreName( p_vout->p_sys->p_display,
-                               p_win->base_window, val.psz_string );
-                }
-                if( val.psz_string ) free( val.psz_string );
-            }
-        }
+			);
+	}
+	else
+	{
+	    XStoreName( p_vout->p_sys->p_display,
+			p_win->base_window, val.psz_string );
+	}
+	if( val.psz_string ) free( val.psz_string );
+
+	if( !var_GetBool( p_vout, "video-deco") || p_vout->b_fullscreen)
+	{
+	    Atom prop;
+	    mwmhints_t mwmhints;
+
+	    mwmhints.flags = MWM_HINTS_DECORATIONS;
+	    mwmhints.decorations = False;
+
+	    prop = XInternAtom( p_vout->p_sys->p_display, "_MOTIF_WM_HINTS",
+				False );
+
+	    XChangeProperty( p_vout->p_sys->p_display,
+			     p_win->base_window,
+			     prop, prop, 32, PropModeReplace,
+			     (unsigned char *)&mwmhints,
+			     PROP_MWM_HINTS_ELEMENTS );
+	}
     }
     else
     {
I  have left  XSetWMNormalHints and  XSet inside  the  conditional block
because fullscreen does not work one time out of two if they are called.

The window  is still  created on  the wrong screen  then moved.  I think
since we create  a new window each time we go  full screen, the creation
should  be done  in  the right  place and  we  should not  have to  move
it.
-- 
IT'S POTATO, NOT POTATOE
IT'S POTATO, NOT POTATOE
IT'S POTATO, NOT POTATOE
-+- Bart Simpson on chalkboard in episode 7F01

Reply via email to