You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
kwin/0006-Improve-virtual-deskto...

59 lines
2.5 KiB

From 7339e9639ff53955862da74e48d5440ff465dbca Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thomas=20L=C3=BCbking?= <thomas.luebking@gmail.com>
Date: Thu, 22 Oct 2015 23:46:19 +0200
Subject: [PATCH 6/6] Improve virtual desktop selection for transients
a) When a group-transient is modal, it still needs to be
on the current or all virtual desktops if *any* of the
blocked clients is
BUG: 354090
FIXED-IN: 5.5
b) ignore demanded virtual desktop for transients. Notably modal transients
should appear where their parent is, and not drag that around. All others
also better show up above their parent and not a distant virtual desktop
REVIEW: 125758
---
manage.cpp | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/manage.cpp b/manage.cpp
index 4dd1033..c5f1744 100644
--- a/manage.cpp
+++ b/manage.cpp
@@ -196,8 +196,10 @@ bool Client::manage(xcb_window_t w, bool isMapped)
for (ClientList::ConstIterator it = mainclients.constBegin();
it != mainclients.constEnd();
++it) {
- if (mainclients.count() > 1 && (*it)->isSpecialWindow())
- continue; // Don't consider toolbars etc when placing
+ if (mainclients.count() > 1 && // A group-transient
+ (*it)->isSpecialWindow() && // Don't consider toolbars etc when placing
+ !(info->state() & NET::Modal)) // except when it's modal (blocks specials as well)
+ continue;
maincl = *it;
if ((*it)->isOnCurrentDesktop())
on_current = true;
@@ -213,11 +215,12 @@ bool Client::manage(xcb_window_t w, bool isMapped)
if (maincl)
setOnActivities(maincl->activities());
+ } else { // a transient shall appear on its leader and not drag that around
+ if (info->desktop())
+ desk = info->desktop(); // Window had the initial desktop property, force it
+ if (desktop() == 0 && asn_valid && asn_data.desktop() != 0)
+ desk = asn_data.desktop();
}
- if (info->desktop())
- desk = info->desktop(); // Window had the initial desktop property, force it
- if (desktop() == 0 && asn_valid && asn_data.desktop() != 0)
- desk = asn_data.desktop();
#ifdef KWIN_BUILD_ACTIVITIES
if (Activities::self() && !isMapped && !noborder && isNormalWindow() && !activitiesDefined) {
//a new, regular window, when we're not recovering from a crash,
--
1.9.3