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

List:       kwin
Subject:    Re: Review Request 114647: re-evaluate rules on title change
From:       Thomas_Lübking <thomas.luebking () gmail ! com>
Date:       2014-01-18 14:27:53
Message-ID: 20140118142753.23663.45804 () probe ! kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> On Jan. 3, 2014, 8:44 a.m., Martin Gräßlin wrote:
> > kwin/rules.cpp, line 850
> > <https://git.reviewboard.kde.org/r/114647/diff/2/?file=227069#file227069line850>
> > 
> > why is it needed to disconnect the signal?
> 
> Thomas Lübking wrote:
> The re-read may have been caused by rulebook changes that removed the need to track \
> the title. The very next call will restore the connection if it's still required.
> 
> For Qt4 one cannot inspect connections (and unbind afterwards if was bound and no \
> longer has to be), so the "broadsword" to first cut off all and reconnect in case \
> is inevitable. And actually i guess given the low frequency of rulebook updates, \
> that would be overengineering as well ;-)

ping.


- Thomas


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/114647/#review46661
-----------------------------------------------------------


On Dec. 24, 2013, 2:45 p.m., Thomas Lübking wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/114647/
> -----------------------------------------------------------
> 
> (Updated Dec. 24, 2013, 2:45 p.m.)
> 
> 
> Review request for kwin and Martin Gräßlin.
> 
> 
> Bugs: 220227
> http://bugs.kde.org/show_bug.cgi?id=220227
> 
> 
> Repository: kde-workspace
> 
> 
> Description
> -------
> 
> turned out to be more "elegant" and only lasted 15 minutes =)
> 
> If a rule minus the title match matches, the captionChanged signal is bound to \
> re-evaluate the rules for that client, ie. the tracking overhead only exists for \
> those clients where title matching is relevant and costs rematching all rules when \
> such client changes its title (yes, the partial matching rules could be stored for \
> faster re-check, but that would make the patch bigger and is probably not worth it; \
> just some string comparisms) 
> additional tracking of wm_class or wm_role (what is iirc a netwm violation anyway) \
> would require to monitor the resp. property for changes (not done atm.) 
> 
> Diffs
> -----
> 
> kwin/client.h a2b3365 
> kwin/client.cpp 4b88f22 
> kwin/rules.cpp 9244d06 
> 
> Diff: https://git.reviewboard.kde.org/r/114647/diff/
> 
> 
> Testing
> -------
> 
> setup some title matching rule for my browser and chased it across the virtual \
> desktops by changing the active tab :) 
> 
> 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="https://git.reviewboard.kde.org/r/114647/">https://git.reviewboard.kde.org/r/114647/</a>
  </td>
    </tr>
   </table>
   <br />










<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On January 3rd, 2014, 8:44 a.m. UTC, <b>Martin \
Gräßlin</b> wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">  



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;">  <a \
href="https://git.reviewboard.kde.org/r/114647/diff/2/?file=227069#file227069line850" \
style="color: black; font-weight: bold; text-decoration: \
underline;">kwin/rules.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 2)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; \
">CHECK_FORCE_RULE(DisableGlobalShortcuts, bool)</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">848</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="n">disconnect</span><span class="p">(</span><span class="k">this</span><span \
class="p">,</span> <span class="n">SIGNAL</span><span class="p">(</span><span \
class="n">captionChanged</span><span class="p">()),</span> <span \
class="k">this</span><span class="p">,</span> <span class="n">SLOT</span><span \
class="p">(</span><span class="n">evaluateWindowRules</span><span \
class="p">()));</span></pre></td>  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">why is it needed to \
disconnect the signal?</pre>  </blockquote>



 <p>On January 3rd, 2014, 5:42 p.m. UTC, <b>Thomas Lübking</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">The re-read may have \
been caused by rulebook changes that removed the need to track the title. The very \
next call will restore the connection if it&#39;s still required.

For Qt4 one cannot inspect connections (and unbind afterwards if was bound and no \
longer has to be), so the &quot;broadsword&quot; to first cut off all and reconnect \
in case is inevitable. And actually i guess given the low frequency of rulebook \
updates, that would be overengineering as well ;-)</pre>  </blockquote>







</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">ping.</pre> \
<br />




<p>- Thomas</p>


<br />
<p>On December 24th, 2013, 2:45 p.m. UTC, Thomas Lübking wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('https://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;">  <tr>
  <td>

<div>Review request for kwin and Martin Gräßlin.</div>
<div>By Thomas Lübking.</div>


<p style="color: grey;"><i>Updated Dec. 24, 2013, 2:45 p.m.</i></p>







<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=220227">220227</a>


</div>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kde-workspace
</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;">turned out to be more &quot;elegant&quot; and only lasted 15 minutes =)

If a rule minus the title match matches, the captionChanged signal is bound to \
re-evaluate the rules for that client, ie. the tracking overhead only exists for \
those clients where title matching is relevant and costs rematching all rules when \
such client changes its title (yes, the partial matching rules could be stored for \
faster re-check, but that would make the patch bigger and is probably not worth it; \
just some string comparisms)

additional tracking of wm_class or wm_role (what is iirc a netwm violation anyway) \
would require to monitor the resp. property for changes (not done atm.)</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;">setup some title matching rule for my browser and chased it across the \
virtual desktops by changing the active tab :)</pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>kwin/client.h <span style="color: grey">(a2b3365)</span></li>

 <li>kwin/client.cpp <span style="color: grey">(4b88f22)</span></li>

 <li>kwin/rules.cpp <span style="color: grey">(9244d06)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/114647/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