From 0c0118f5e861737eedb703ff307e9cbda6c5496d Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Tue, 17 Aug 2021 10:53:19 +0300 Subject: [PATCH] Port Workspace::takeActivity() to VirtualDesktop Workspace::takeActivity() forces the modal dialog and its parent window to be on the same virtual desktop. It uses int-based desktop ids for that purpose. This change ports the relevant parts of Workspace::takeActivity() to the VirtualDesktop object. --- src/activation.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/activation.cpp b/src/activation.cpp index c7d06d47ec..4136714f22 100644 --- a/src/activation.cpp +++ b/src/activation.cpp @@ -349,8 +349,9 @@ bool Workspace::takeActivity(AbstractClient* c, ActivityFlags flags) if (flags & ActivityFocus) { AbstractClient* modal = c->findModal(); if (modal != nullptr && modal != c) { - if (!modal->isOnDesktop(c->desktop())) - modal->setDesktop(c->desktop()); + if (modal->desktops() != c->desktops()) { + modal->setDesktops(c->desktops()); + } if (!modal->isShown(true) && !modal->isMinimized()) // forced desktop or utility window activateClient(modal); // activating a minimized blocked window will unminimize its modal implicitly // if the click was inside the window (i.e. handled is set),