vlc/vlc-2.2 | branch: master | Erwan Tulou <[email protected]> | Tue Sep 8 13:46:54 2015 +0200| [479bc999e204f03299df69a5a04977ce1e0a6267] | committer: Jean-Baptiste Kempf
skins2(Linux): fix fullscreen for some Window Managers like Gnome3 Some Window Managers (Gnome3, Unity) will keep the task bar displayed and limit the fullscreen display to the subarea outside the task bar if the window type is not set. Setting the Window type to normal ensures a clean 100% fullscreen. This fixes an issue reported on the forum at https://forum.videolan.org/viewtopic.php?f=13&t=127840 (cherry picked from commit 51e41b79f4849934b32d19cba21e7185d35f9f9d) Signed-off-by: Jean-Baptiste Kempf <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=479bc999e204f03299df69a5a04977ce1e0a6267 --- modules/gui/skins2/x11/x11_display.cpp | 3 +++ modules/gui/skins2/x11/x11_display.hpp | 6 ++++++ modules/gui/skins2/x11/x11_window.cpp | 13 +++++++++++++ 3 files changed, 22 insertions(+) diff --git a/modules/gui/skins2/x11/x11_display.cpp b/modules/gui/skins2/x11/x11_display.cpp index ac02312..eac50c9 100644 --- a/modules/gui/skins2/x11/x11_display.cpp +++ b/modules/gui/skins2/x11/x11_display.cpp @@ -330,6 +330,9 @@ void X11Display::testEWMH() msg_Dbg( getIntf(), "%s support: yes", value );\ } + TEST_EWMH( m_net_wm_window_type, "_NET_WM_WINDOW_TYPE" ) + TEST_EWMH( m_net_wm_window_type_normal, "_NET_WM_WINDOW_TYPE_NORMAL" ) + TEST_EWMH( m_net_wm_state, "_NET_WM_STATE" ) TEST_EWMH( m_net_wm_state_fullscreen, "_NET_WM_STATE_FULLSCREEN" ) TEST_EWMH( m_net_wm_stays_on_top, "_NET_WM_STATE_STAYS_ON_TOP" ) diff --git a/modules/gui/skins2/x11/x11_display.hpp b/modules/gui/skins2/x11/x11_display.hpp index 9647263..dea86e2 100644 --- a/modules/gui/skins2/x11/x11_display.hpp +++ b/modules/gui/skins2/x11/x11_display.hpp @@ -36,6 +36,8 @@ #define XGC m_rDisplay.getGC() #define NET_WM_SUPPORTED m_rDisplay.m_net_wm_supported +#define NET_WM_WINDOW_TYPE m_rDisplay.m_net_wm_window_type +#define NET_WM_WINDOW_TYPE_NORMAL m_rDisplay.m_net_wm_window_type_normal #define NET_WM_STATE m_rDisplay.m_net_wm_state #define NET_WM_STATE_FULLSCREEN m_rDisplay.m_net_wm_state_fullscreen #define NET_WM_STATE_ABOVE m_rDisplay.m_net_wm_state_above @@ -85,6 +87,10 @@ public: /// EWMH spec Atom m_net_wm_supported; + + Atom m_net_wm_window_type; + Atom m_net_wm_window_type_normal; + Atom m_net_wm_state; Atom m_net_wm_state_above; Atom m_net_wm_state_fullscreen; diff --git a/modules/gui/skins2/x11/x11_window.cpp b/modules/gui/skins2/x11/x11_window.cpp index 6473c21..ca4e6b0 100644 --- a/modules/gui/skins2/x11/x11_window.cpp +++ b/modules/gui/skins2/x11/x11_window.cpp @@ -221,6 +221,19 @@ X11Window::X11Window( intf_thread_t *pIntf, GenericWindow &rWindow, XChangeProperty( XDISPLAY, m_wnd, NET_WM_PID, XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&pid, 1 ); + if( NET_WM_WINDOW_TYPE != None ) + { + if( type == GenericWindow::FullscreenWindow ) + { + // Some Window Managers like Gnome3 limit fullscreen to the + // subarea outside the task bar if no window type is provided. + // For those WMs, setting type window to normal ensures a clean + // 100% fullscreen + XChangeProperty( XDISPLAY, m_wnd, NET_WM_WINDOW_TYPE, + XA_ATOM, 32, PropModeReplace, + (unsigned char *)&NET_WM_WINDOW_TYPE_NORMAL, 1 ); + } + } } _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
