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 <shawn.rutledge@digia.com>
bb10
Alexander Volkov 2014-09-26 14:57:15 +04:00
parent e297d72fa6
commit 2045a657da
1 changed files with 3 additions and 3 deletions

View File

@ -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) {