From: Rmi Denis-Courmont Date: Wed, 11 Nov 2009 18:20:31 +0000 (+0200) Subject: Fix EMWH fullscreen mode request X-Git-Url: http://git.videolan.org/?p=vlc.git;a=commitdiff_plain;h=393fde7391773e8a6e8ba260c79926f8e406a82b Fix EMWH fullscreen mode request --- diff --git a/modules/video_output/x11/xcommon.c b/modules/video_output/x11/xcommon.c index 61ef979..6578fdc 100644 --- a/modules/video_output/x11/xcommon.c +++ b/modules/video_output/x11/xcommon.c @@ -2179,21 +2179,24 @@ static void ToggleFullScreen ( vout_thread_t *p_vout ) if( p_vout->p_sys->b_net_wm_state_fullscreen ) { - XClientMessageEvent event; - - memset( &event, 0, sizeof( XClientMessageEvent ) ); - - event.type = ClientMessage; - event.message_type = p_vout->p_sys->net_wm_state; - event.display = p_vout->p_sys->p_display; - event.window = p_vout->p_sys->p_win->base_window; - event.format = 32; - event.data.l[ 0 ] = 1; /* set property */ - event.data.l[ 1 ] = p_vout->p_sys->net_wm_state_fullscreen; + XClientMessageEvent event = { + .type = ClientMessage, + .window = p_vout->p_sys->p_win->base_window, + .message_type = p_vout->p_sys->net_wm_state, + .format = 32, + .data = { + .l = { + 1, /* set property */ + p_vout->p_sys->net_wm_state_fullscreen, + 0, + 1, + }, + }, + }; XSendEvent( p_vout->p_sys->p_display, DefaultRootWindow( p_vout->p_sys->p_display ), - False, SubstructureRedirectMask, + False, SubstructureNotifyMask|SubstructureRedirectMask, (XEvent*)&event ); } From: Rmi Denis-Courmont Date: Wed, 11 Nov 2009 18:20:51 +0000 (+0200) Subject: Do not reparent after requesting fullscreen mode X-Git-Url: http://git.videolan.org/?p=vlc.git;a=commitdiff_plain;h=eb31e0f623516e81a01600e5ef1237e01fe3cd47 Do not reparent after requesting fullscreen mode Some (all?) window managers will clear the fullscreen state when the window reparents. Instead, always reparent first then ask for fullscreen. This hopefully fixes the taskbar over video bug with KDE 4.3.3. --- diff --git a/modules/video_output/x11/xcommon.c b/modules/video_output/x11/xcommon.c index 6578fdc..7b83541 100644 --- a/modules/video_output/x11/xcommon.c +++ b/modules/video_output/x11/xcommon.c @@ -2169,14 +2169,13 @@ static void ToggleFullScreen ( vout_thread_t *p_vout ) p_vout->p_sys->p_win->base_window, CWOverrideRedirect, &attributes); - - /* Make sure the change is effective */ - XReparentWindow( p_vout->p_sys->p_display, - p_vout->p_sys->p_win->base_window, - DefaultRootWindow( p_vout->p_sys->p_display ), - 0, 0 ); } + /* Make sure the change is effective */ + XReparentWindow( p_vout->p_sys->p_display, + p_vout->p_sys->p_win->base_window, + DefaultRootWindow( p_vout->p_sys->p_display ), 0, 0 ); + if( p_vout->p_sys->b_net_wm_state_fullscreen ) { XClientMessageEvent event = { @@ -2215,11 +2214,6 @@ static void ToggleFullScreen ( vout_thread_t *p_vout ) * as really the wm should be deciding if, on fullscreening of a window * the focus should go there or not, so let the wm decided */ #define APPFOCUS 0 - /* Make sure the change is effective */ - XReparentWindow( p_vout->p_sys->p_display, - p_vout->p_sys->p_win->base_window, - DefaultRootWindow( p_vout->p_sys->p_display ), - 0, 0 ); #ifdef HAVE_XINERAMA if( XineramaQueryExtension( p_vout->p_sys->p_display, &i_d1, &i_d2 ) &&