diff options
author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2020-02-11 14:28:32 +0100 |
---|---|---|
committer | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2020-02-13 09:03:00 +0100 |
commit | e21230a3b8b4aca50121c373a6ffea770807d4a0 (patch) | |
tree | a8f58a963f3949254bae82a631059b9d08b9d7aa /src | |
parent | 1ef3ec8cae1f27a15b131f82d6401fd6bb79c9fa (diff) |
Client: Don't allow decorations for frameless windows
This only fixes it for when Qt::FramelessWindowHint is set appropriately before
the window is shown.
[ChangeLog][QPA plugin] Windows with Qt::FramelessWindowHint no longer
create zxdg_toplevel_decoration_v1, as that allowed compositors to force
server-side decorations.
Fixes: QTBUG-80702
Change-Id: I47a582a59f6682a57128c0c9d4e4b9a6181925a4
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp index a8e662679..56d77ec4f 100644 --- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp +++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp @@ -56,10 +56,11 @@ QWaylandXdgSurface::Toplevel::Toplevel(QWaylandXdgSurface *xdgSurface) : QtWayland::xdg_toplevel(xdgSurface->get_toplevel()) , m_xdgSurface(xdgSurface) { - if (auto *decorationManager = m_xdgSurface->m_shell->decorationManager()) - m_decoration = decorationManager->createToplevelDecoration(object()); - QWindow *window = xdgSurface->window()->window(); + if (auto *decorationManager = m_xdgSurface->m_shell->decorationManager()) { + if (!(window->flags() & Qt::FramelessWindowHint)) + m_decoration = decorationManager->createToplevelDecoration(object()); + } requestWindowStates(window->windowStates()); requestWindowFlags(window->flags()); } |