[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kwin] /: restrict cross-vd activation to in-client distrib
From:       Thomas_Lübking <thomas.luebking () gmail ! com>
Date:       2016-02-27 10:28:00
Message-ID: E1aZc6S-0004r0-P9 () scm ! kde ! org
[Download RAW message or body]

Git commit 0e80a16db57cb194431725aa204e1fa871ea87c6 by Thomas L=C3=BCbking.
Committed on 27/02/2016 at 10:26.
Pushed by luebking into branch 'master'.

restrict cross-vd activation to in-client distrib

QDialog or at least QMessageBox does this and I doubt Lubos' idea was to
"allow focus stealing if the client nags enough" - switching the VD is a
major interrupt and prevented when a new window shows up.
It should not be possible to stomp on ground and then receive
focus - notably not on the other desktop.

I assume the original idea was to let clients distribute focus *inside*
across virtual desktops, maybe also permit when no client was active,
but hardly otherwise.

BUG: 359683
FIXED-IN: 5.6
REVIEW: 127153

M  +3    -0    activation.cpp

http://commits.kde.org/kwin/0e80a16db57cb194431725aa204e1fa871ea87c6

diff --git a/activation.cpp b/activation.cpp
index 98c06c1..b57fda8 100644
--- a/activation.cpp
+++ b/activation.cpp
@@ -607,6 +607,9 @@ bool Workspace::allowClientActivation(const KWin::Abstr=
actClient *c, xcb_timesta
         return true;
     }
 =

+    if (!c->isOnCurrentDesktop()) // we allowed explicit self-activation a=
cross virtual desktops
+        return false; // inside a client or if no client was active, but n=
ot otherwise
+
     // High FPS, not intr-client change. Only allow if the active client h=
as only minor interest
     if (level > FSP::Medium && protection > FSP::Low)
         return false;
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic