From fc925f49b39f1d464c4df73b4bbc13cc52cc4f72 Mon Sep 17 00:00:00 2001 From: Mikhail Zolotukhin Date: Tue, 29 Mar 2022 19:55:12 +0300 Subject: [PATCH] chore(new_backend): ignore windows smarter --- src/core/engine/engine.cpp | 11 +++++++++-- src/core/plasma-api/client.hpp | 13 ++++++------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/core/engine/engine.cpp b/src/core/engine/engine.cpp index b3cefbf9..ea8f0cf0 100644 --- a/src/core/engine/engine.cpp +++ b/src/core/engine/engine.cpp @@ -20,8 +20,15 @@ Engine::Engine(PlasmaApi::Api &api, const Bismuth::Config &config) void Engine::addWindow(PlasmaApi::Client client) { // Don't manage special windows - docks, panels, etc. - // Also don't tile launchers - if (client.specialWindow() || client.dialog() || client.resourceClass() == QByteArrayLiteral("krunner")) { + if (client.specialWindow() || client.dialog()) { + return; + } + + // If the window is initially set to be always on top, it means that it + // definitely does not want to be tiled. This also might be a signal, that + // the window is a launcher: KRunner, ULauncher, etc. This also keeps away + // various application pop-ups + if (client.keepAbove()) { return; } diff --git a/src/core/plasma-api/client.hpp b/src/core/plasma-api/client.hpp index f2a08436..c94bebd0 100644 --- a/src/core/plasma-api/client.hpp +++ b/src/core/plasma-api/client.hpp @@ -101,13 +101,12 @@ class Client : public TopLevel // */ // Q_PROPERTY(bool fullScreen READ fullScreen WRITE set_fullScreen) // BOOL_PRIMITIVE_SETGET(fullScreen) - // - // /** - // * Whether the window is set to be above all - // */ - // Q_PROPERTY(bool keepAbove READ keepAbove WRITE set_keepAbove) - // BOOL_PRIMITIVE_SETGET(keepAbove) - // + + /** + * Whether the window is set to be above all + */ + BI_PROPERTY(bool, keepAbove, setKeepAbove) + // /** // * Whether the window is set to be below all // */