From 7f4d1120c56e96577e4fb43de167c06b5d57385e Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Thu, 19 Nov 2020 16:31:42 +0100 Subject: [PATCH] Have clients where we've set their position as non-placeable If the client opted to position them on purpose, don't move them around. If the geometry of the workspace changes it's their job to react accordingly. BUG: 429353 --- xdgshellclient.cpp | 5 +++++ xdgshellclient.h | 1 + 2 files changed, 6 insertions(+) diff --git a/xdgshellclient.cpp b/xdgshellclient.cpp index 629f0d8011..7694d71e6e 100644 --- a/xdgshellclient.cpp +++ b/xdgshellclient.cpp @@ -547,6 +547,11 @@ bool XdgToplevelClient::isMinimizable() const return true; } +bool XdgToplevelClient::isPlaceable() const +{ + return !m_plasmaShellSurface || !m_plasmaShellSurface->isPositionSet(); +} + bool XdgToplevelClient::isTransient() const { return m_isTransient; diff --git a/xdgshellclient.h b/xdgshellclient.h index aea4b311f2..1cad828050 100644 --- a/xdgshellclient.h +++ b/xdgshellclient.h @@ -132,6 +132,7 @@ public: bool isFullScreenable() const override; bool isMaximizable() const override; bool isMinimizable() const override; + bool isPlaceable() const override; bool isTransient() const override; bool userCanSetFullScreen() const override; bool userCanSetNoBorder() const override;