From 2045a657da213ba5ba1a72941ee714d5d04252dc Mon Sep 17 00:00:00 2001 From: Alexander Volkov Date: Fri, 26 Sep 2014 14:57:15 +0400 Subject: xcb: Fix detecting the fullscreen state from _NET_WM_STATE flags A fullscreen window can have maximized flags being set so first check the NetWmStateFullScreen flag. Change-Id: Ia802abf3cfa4c784baa2d55088e3f53310f0362e Reviewed-by: Shawn Rutledge --- src/plugins/platforms/xcb/qxcbwindow.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/plugins/platforms/xcb') diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp index e45f26e728..c4cf3b4416 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.cpp +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp @@ -2113,10 +2113,10 @@ void QXcbWindow::handlePropertyNotifyEvent(const xcb_property_notify_event_t *ev if (newState != Qt::WindowMinimized) { // Something else changed, get _NET_WM_STATE. const NetWmStates states = netWmStates(); - if ((states & NetWmStateMaximizedHorz) && (states & NetWmStateMaximizedVert)) - newState = Qt::WindowMaximized; - else if (states & NetWmStateFullScreen) + if (states & NetWmStateFullScreen) newState = Qt::WindowFullScreen; + else if ((states & NetWmStateMaximizedHorz) && (states & NetWmStateMaximizedVert)) + newState = Qt::WindowMaximized; } // Send Window state, compress events in case other flags (modality, etc) are changed. if (m_lastWindowStateEvent != newState) { -- cgit v1.2.3