[prev in list] [next in list] [prev in thread] [next in thread]
List: kwin
Subject: Review Request: Fix indirect(?) wm_take_focus(?) handling
From: Thomas_Lübking <thomas.luebking () web ! de>
Date: 2012-01-14 20:48:46
Message-ID: 20120114204846.29614.97278 () vidsolbach ! de
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/103700/
-----------------------------------------------------------
Review request for kwin.
Description
-------
This one's weird.
If there's more than one plasma activity, activating a client (from kwin) triggers \
changeActiveWindow() from a root window event. One of the outcomes is the behavior \
described in the attached bug, but actually activating a window becomes the same as \
a) activating it b) make the window call for self-activation
-----------------
I'm not sure what exactly causes this (ie.. activity implementation in plasma-desktop \
or kwin), but what happens is:
activation.cpp
void Workspace::requestFocus(Client* c, bool force)
-> void Workspace::takeActivity(Client* c, int flags, bool handled)
-> client.cpp
void Client::takeActivity(int flags, bool handled, allowed_t)
-> void Client::takeFocus(allowed_t)
-> XSetInputFocus(display(), window(), RevertToPointerRoot, xTime());
==> events.cpp // from this point we handle the property change on the root window
void RootInfo::changeActiveWindow(Window w, NET::RequestSource src, Time timestamp, \
Window active_window) // workspace->activateClient(c);
-> activation.cpp
Workspace::activateClient(Client *c);
-> raise() // by the bugreport unwanted
-------------
The patch fixes it by ignoring self-activating calls of the last client we intended \
to pass the focus anyway. This fixes a bug, so it's suitable for 4.8, but it's very \
late and w/o really knowing what's actually broken and given the present bug will \
affect a minority (i dare to claim that the amount of pp. using such focus policy, no \
autoraise and yet interested in activities is close to void.) i'd rather suggest to \
not add it for 4.8.0 but test it locally and add it for 4.8.1 if there's no apparent \
side-effect. Or we figure what's actually happening there to break it.
This addresses bug 240673.
http://bugs.kde.org/show_bug.cgi?id=240673
Diffs
-----
kwin/events.cpp 26e0139
Diff: http://git.reviewboard.kde.org/r/103700/diff/diff
Testing
-------
Yes, adding a second activity and changing activities reliably caused this for me \
(across WM restarts!) - it's gone with the patch (and why that works, i actually /do/ \
understand ;-)
Thanks,
Thomas Lübking
[Attachment #5 (text/html)]
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;"> <tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://git.reviewboard.kde.org/r/103700/">http://git.reviewboard.kde.org/r/103700/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;"> <tr>
<td>
<div>Review request for kwin.</div>
<div>By Thomas Lübking.</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">This one's weird. If there's more than one plasma activity, \
activating a client (from kwin) triggers changeActiveWindow() from a root window \
event. One of the outcomes is the behavior described in the attached bug, but \
actually activating a window becomes the same as a) activating it
b) make the window call for self-activation
-----------------
I'm not sure what exactly causes this (ie.. activity implementation in \
plasma-desktop or kwin), but what happens is:
activation.cpp
void Workspace::requestFocus(Client* c, bool force)
-> void Workspace::takeActivity(Client* c, int flags, bool handled)
-> client.cpp
void Client::takeActivity(int flags, bool handled, allowed_t)
-> void Client::takeFocus(allowed_t)
-> XSetInputFocus(display(), window(), RevertToPointerRoot, xTime());
==> events.cpp // from this point we handle the property change on the root window
void RootInfo::changeActiveWindow(Window w, NET::RequestSource src, Time timestamp, \
Window active_window) // workspace->activateClient(c);
-> activation.cpp
Workspace::activateClient(Client *c);
-> raise() // by the bugreport unwanted
-------------
The patch fixes it by ignoring self-activating calls of the last client we intended \
to pass the focus anyway. This fixes a bug, so it's suitable for 4.8, but \
it's very late and w/o really knowing what's actually broken and given the \
present bug will affect a minority (i dare to claim that the amount of pp. using such \
focus policy, no autoraise and yet interested in activities is close to void.) \
i'd rather suggest to not add it for 4.8.0 but test it locally and add it for \
4.8.1 if there's no apparent side-effect. Or we figure what's actually \
happening there to break it.</pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Yes, adding a second activity and changing activities reliably caused \
this for me (across WM restarts!) - it's gone with the patch (and why that works, \
i actually /do/ understand ;-)</pre> </td>
</tr>
</table>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="http://bugs.kde.org/show_bug.cgi?id=240673">240673</a>
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>kwin/events.cpp <span style="color: grey">(26e0139)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/103700/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
_______________________________________________
kwin mailing list
kwin@kde.org
https://mail.kde.org/mailman/listinfo/kwin
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic