Client: Fix fullscreen regression on wl-shell

The code for isNormal was wrong, so set_toplevel (which clears fullscreen
state) would be sent unless the window was both maximized and fullscreen. Fixed
it and made it a little bit more readable.

Change-Id: Icaa52d3a058df064a0bd1164119af3f511cb4220
Fixes: QTBUG-71350
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Reviewed-by: David Edmundson <davidedmundson@kde.org>
This commit is contained in:
Johan Klokkhammer Helsing 2018-10-24 09:25:42 +02:00 committed by Johan Helsing
parent 6f183c7db7
commit f033e17099

View File

@ -180,7 +180,7 @@ void QWaylandWlShellSurface::requestWindowStates(Qt::WindowStates states)
m_window->applyConfigureWhenPossible();
}
bool isNormal = ~states & (Qt::WindowMaximized | Qt::WindowFullScreen);
bool isNormal = !(states & Qt::WindowMaximized) && !(states & Qt::WindowFullScreen);
if (isNormal && (changedStates & (Qt::WindowMaximized | Qt::WindowFullScreen))) {
setTopLevel(); // set normal window
// There's usually no configure event after this, so just clear the rest of the pending