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

List:       kwin
Subject:    Re: Review Request: Fix indirect(?) wm_take_focus(?) handling
From:       "Commit Hook" <null () kde ! org>
Date:       2012-01-24 22:04:50
Message-ID: 20120124220450.27939.4165 () 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/#review10060
-----------------------------------------------------------


This review has been submitted with commit 9c377f223edb14d83ae079f203c36244c3208a0e \
by Thomas Lübking to branch master.

- Commit Hook


On Jan. 14, 2012, 8:48 p.m., Thomas Lübking wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/103700/
> -----------------------------------------------------------
> 
> (Updated Jan. 14, 2012, 8:48 p.m.)
> 
> 
> 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 />





 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This review has been \
submitted with commit 9c377f223edb14d83ae079f203c36244c3208a0e by Thomas Lübking to \
branch master.</pre>  <br />







<p>- Commit</p>


<br />
<p>On January 14th, 2012, 8:48 p.m., Thomas Lübking wrote:</p>






<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>


<p style="color: grey;"><i>Updated Jan. 14, 2012, 8:48 p.m.</i></p>






<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&#39;s weird. If there&#39;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&#39;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)
-&gt; void Workspace::takeActivity(Client* c, int flags, bool handled)
-&gt; client.cpp
void Client::takeActivity(int flags, bool handled, allowed_t)
-&gt; void Client::takeFocus(allowed_t)
-&gt; XSetInputFocus(display(), window(), RevertToPointerRoot, xTime());

==&gt; 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-&gt;activateClient(c);
-&gt; activation.cpp
Workspace::activateClient(Client *c);
-&gt; 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&#39;s suitable for 4.8, but \
it&#39;s very late and w/o really knowing what&#39;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&#39;d rather suggest to not add it for 4.8.0 but test it locally and add it for \
4.8.1 if there&#39;s no apparent side-effect. Or we figure what&#39;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&#39;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