diff --git a/src/plugins/platforms/wayland/plugins/shellintegration/wl-shell/qwaylandwlshellsurface.cpp b/src/plugins/platforms/wayland/plugins/shellintegration/wl-shell/qwaylandwlshellsurface.cpp index d9bc83059b8..88a63655ce1 100644 --- a/src/plugins/platforms/wayland/plugins/shellintegration/wl-shell/qwaylandwlshellsurface.cpp +++ b/src/plugins/platforms/wayland/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