[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:       Thomas_Lübking <thomas.luebking () web ! de>
Date:       2011-03-20 17:53:16
Message-ID: 20110320175316.14129.88274 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> On March 20, 2011, 4:31 p.m., Martin Gräßlin wrote:
> > 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)

Afaik unity will explicitly NOT require compositing (at all) - therefore the move \
towards Qt. However i'm not too optimistic that it will be accepted (outside KDE) \
either. We might have to think about a (partial) logic inversion.

In that case, every fullscreen client would block compositing unless explicitly \
permitting it.

So _KDE_NET_WM_BLOCK_COMPOSITING would turn into _KDE_NET_WM_WANT_COMPOSITING
0 means "no", everything else "yes" and an absent property triggers the default \
behavior (not fs -> compositing good, fs -> compositing bad)

This way we'd catch "legal" fs clients (games, video players) out of the box, nasty \
(tm ;-) gkt+ applications (office/browser) look "ugly" in fs while fs prone KDE \
applications (<strike>koffice</strike> calligra, konqueror/rekonq i assume? - \
whatever) could keep compositing active despite the fs mode.

I'd rather dislike this way, but ultimately it's the result on the user desktop that \
matters... :-\

=> I'll branch off the netwm stuff, we try and on failure can still think about the \
more aggressive push.


> On March 20, 2011, 4:31 p.m., Martin Gräßlin wrote:
> > kwin/client.cpp, lines 2114-2117
> > <http://git.reviewboard.kde.org/r/100893/diff/1/?file=11605#file11605line2114>
> > 
> > Why the bool readProperty? If I read the code correctly it's a no-op if \
> > readProperty is false

Code body. If we don't (find a way to) do it state dependent (fs mode) it's \
completely superfluous. Otherwise just lacks "else blocks_compositing = \
rules()->checkBlockCompositing(blocks_compositing);"


- Thomas


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


On March 20, 2011, 3:11 p.m., Thomas Lübking 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 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) 
> 
> 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 />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On March 20th, 2011, 4:31 p.m., <b>Martin \
Gräßlin</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;">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>  </blockquote>







</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Afaik unity will \
explicitly NOT require compositing (at all) - therefore the move towards Qt. However \
i&#39;m not too optimistic that it will be accepted (outside KDE) either. We might \
have to think about a (partial) logic inversion.

In that case, every fullscreen client would block compositing unless explicitly \
permitting it.

So _KDE_NET_WM_BLOCK_COMPOSITING would turn into _KDE_NET_WM_WANT_COMPOSITING
0 means &quot;no&quot;, everything else &quot;yes&quot; and an absent property \
triggers the default behavior (not fs -&gt; compositing good, fs -&gt; compositing \
bad)

This way we&#39;d catch &quot;legal&quot; fs clients (games, video players) out of \
the box, nasty (tm ;-) gkt+ applications (office/browser) look &quot;ugly&quot; in fs \
while fs prone KDE applications (&lt;strike&gt;koffice&lt;/strike&gt; calligra, \
konqueror/rekonq i assume? - whatever) could keep compositing active despite the fs \
mode.

I&#39;d rather dislike this way, but ultimately it&#39;s the result on the user \
desktop that matters... :-\

=&gt; I&#39;ll branch off the netwm stuff, we try and on failure can still think \
about the more aggressive push.</pre> <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On March 20th, 2011, 4:31 p.m., <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="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="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>  </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;">Code body. \
If we don&#39;t (find a way to) do it state dependent (fs mode) it&#39;s completely \
superfluous. Otherwise just lacks &quot;else blocks_compositing = \
rules()-&gt;checkBlockCompositing(blocks_compositing);&quot;</pre> <br />




<p>- Thomas</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