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

List:       kwin
Subject:    Re: Review Request: Add Rule/Property based composite blocking
From:       Martin_Gräßlin <kde () martin-graesslin ! com>
Date:       2011-03-20 16:31:38
Message-ID: 20110320163138.8857.45248 () 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/100893/#review2063
-----------------------------------------------------------


Very nice functionality, I like it.

Probably we should extend it to
* announce support in _NET_SUPPORTED
* add functionality to netwm/KWindowSystem
* bring it to NETWM spec (though I doubt we have success given that GNOME S=
hell and Unity require compositing all the time)


kwin/client.h
<http://git.reviewboard.kde.org/r/100893/#comment1719>

    maybe more Qt-style: isBlockingComposition()?



kwin/client.cpp
<http://git.reviewboard.kde.org/r/100893/#comment1720>

    Why the bool readProperty? If I read the code correctly it's a no-op if=
 readProperty is false



kwin/client.cpp
<http://git.reviewboard.kde.org/r/100893/#comment1721>

    shouldn't the rules check be outside the if (readProperty) check?


- Martin


On March 20, 2011, 3:11 p.m., Thomas L=C3=BCbking wrote:
> =

> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/100893/
> -----------------------------------------------------------
> =

> (Updated March 20, 2011, 3:11 p.m.)
> =

> =

> Review request for kwin.
> =

> =

> Summary
> -------
> =

> Allows windows (or users via the rule system) to block compositing while =
they're present.
> The user still can resume and re-suspend compositing at any time (but if =
it has originally been suspended for a blocking client it will be resumed t=
he moment the last blocking client disappears)
> =

> Outstanding issue is that the rules to not allow to apply by fullscreen m=
ode.
> No real idea how we should handle this (add to rules globally or do some =
rule specific)
> =

> =

> Diffs
> -----
> =

>   kwin/atoms.h 7d5752c =

>   kwin/atoms.cpp 5e93b2a =

>   kwin/client.h 0d479a0 =

>   kwin/client.cpp ec60bde =

>   kwin/composite.cpp 6783d32 =

>   kwin/events.cpp 05cf864 =

>   kwin/kcmkwin/kwinrules/ruleswidget.h ca44bf2 =

>   kwin/kcmkwin/kwinrules/ruleswidget.cpp f9fc407 =

>   kwin/kcmkwin/kwinrules/ruleswidgetbase.ui 74ac56b =

>   kwin/manage.cpp 135a016 =

>   kwin/rules.h 87b2055 =

>   kwin/rules.cpp 9e4136a =

>   kwin/workspace.h 3f6ad49 =

>   kwin/workspace.cpp 3c77511 =

> =

> Diff: http://git.reviewboard.kde.org/r/100893/diff
> =

> =

> Testing
> -------
> =

> Rule based & "xprop -f _KDE_NET_WM_BLOCK_COMPOSITING 32a -set _KDE_NET_WM=
_BLOCK_COMPOSITING 1"
> No client internal property setting tested (so far) but it should work as=
 well... ;-)
> =

> =

> Thanks,
> =

> Thomas
> =

>


[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/100893/">http://git.reviewboard.kde.org/r/100893/</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;">Very nice functionality, I like it.

Probably we should extend it to
* announce support in _NET_SUPPORTED
* add functionality to netwm/KWindowSystem
* bring it to NETWM spec (though I doubt we have success given that GNOME \
Shell and Unity require compositing all the time)</pre>  <br />





<div>




<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="http://git.reviewboard.kde.org/r/100893/diff/1/?file=11604#file11604line298" \
style="color: black; font-weight: bold; text-decoration: \
underline;">kwin/client.h</a>  <span style="font-weight: normal;">

     (Diff revision 1)

    </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; ">public:</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">298</font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="kr">inline</span> <span class="n">bool</span> <span \
class="nf">blocksCompositing</span><span class="p">()</span> <span \
class="p">{</span> <span class="k">return</span> <span \
class="n">blocks_compositing</span><span class="p">;</span> <span \
class="p">}</span></pre></td>  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">maybe more Qt-style: isBlockingComposition()?</pre> </div>
<br />

<div>




<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="http://git.reviewboard.kde.org/r/100893/diff/1/?file=11605#file11605line2114" \
style="color: black; font-weight: bold; text-decoration: \
underline;">kwin/client.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 1)

    </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; ">void Client::updateCursor()</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">2114</font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="kt">void</span> <span class="n">Client</span><span \
class="o">::</span><span class="n">updateCompositeBlocking</span><span \
class="p">(</span><span class="kt">bool</span> <span \
class="n">readProperty</span><span class="p">)</span></pre></td>  </tr>

  <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">2115</font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="p">{</span></pre></td>  </tr>

  <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">2116</font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="k">const</span> <span class="kt">bool</span> <span \
class="n">usedToBlock</span> <span class="o">=</span> <span \
class="n">blocks_compositing</span><span class="p">;</span></pre></td>  \
</tr>

  <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">2117</font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="k">if</span> <span class="p">(</span><span \
class="n">readProperty</span><span class="p">)</span> <span \
class="p">{</span></pre></td>  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Why the bool readProperty? If I read the code correctly \
it&#39;s a no-op if readProperty is false</pre> </div>
<br />

<div>




<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="http://git.reviewboard.kde.org/r/100893/diff/1/?file=11605#file11605line2124" \
style="color: black; font-weight: bold; text-decoration: \
underline;">kwin/client.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 1)

    </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; ">void Client::updateCursor()</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">2124</font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; ">            <span \
class="n">blocks_compositing</span> <span class="o">=</span> <span \
class="n">rules</span><span class="p">()</span><span \
class="o">-&gt;</span><span class="n">checkBlockCompositing</span><span \
class="p">(</span><span class="n">prop_return</span> <span \
class="o">!=</span> <span class="n">X</span><span class="o">::</span><span \
class="n">None</span><span class="p">);</span></pre></td>  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">shouldn&#39;t the rules check be outside the if (readProperty) \
check?</pre> </div>
<br />



<p>- Martin</p>


<br />
<p>On March 20th, 2011, 3:11 p.m., Thomas Lübking wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.orgrb/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 March 20, 2011, 3:11 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;">Allows windows (or users via the rule system) to block \
compositing while they&#39;re present. The user still can resume and \
re-suspend compositing at any time (but if it has originally been suspended \
for a blocking client it will be resumed the moment the last blocking \
client disappears)

Outstanding issue is that the rules to not allow to apply by fullscreen \
mode. No real idea how we should handle this (add to rules globally or do \
some rule specific)</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;">Rule based &amp; &quot;xprop -f _KDE_NET_WM_BLOCK_COMPOSITING \
32a -set _KDE_NET_WM_BLOCK_COMPOSITING 1&quot; No client internal property \
setting tested (so far) but it should work as well... ;-)</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/atoms.h <span style="color: grey">(7d5752c)</span></li>

 <li>kwin/atoms.cpp <span style="color: grey">(5e93b2a)</span></li>

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

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

 <li>kwin/composite.cpp <span style="color: grey">(6783d32)</span></li>

 <li>kwin/events.cpp <span style="color: grey">(05cf864)</span></li>

 <li>kwin/kcmkwin/kwinrules/ruleswidget.h <span style="color: \
grey">(ca44bf2)</span></li>

 <li>kwin/kcmkwin/kwinrules/ruleswidget.cpp <span style="color: \
grey">(f9fc407)</span></li>

 <li>kwin/kcmkwin/kwinrules/ruleswidgetbase.ui <span style="color: \
grey">(74ac56b)</span></li>

 <li>kwin/manage.cpp <span style="color: grey">(135a016)</span></li>

 <li>kwin/rules.h <span style="color: grey">(87b2055)</span></li>

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

 <li>kwin/workspace.h <span style="color: grey">(3f6ad49)</span></li>

 <li>kwin/workspace.cpp <span style="color: grey">(3c77511)</span></li>

</ul>

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