From 9ebe63181ba3504569c75b25862172353b6cfaa8 Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Wed, 24 Oct 2018 09:25:42 +0200 Subject: 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 Reviewed-by: David Edmundson --- src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface.cpp b/src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface.cpp index d9bc83059..88a63655c 100644 --- a/src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface.cpp +++ b/src/plugins/shellintegration/wl-shell/qwaylandwlshellsurface.cpp @@ -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 -- cgit v1.2.3