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

List:       kwin
Subject:    Re: Review Request: Refactor checks for inclusion of TabBoxClients in the client list
From:       Martin_Gräßlin <kde () martin-graesslin ! com>
Date:       2012-02-29 18:11:36
Message-ID: 20120229181136.29035.18432 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> On Feb. 29, 2012, 6:01 p.m., Stefano Avallone wrote:
> > kwin/tabbox/tabbox.cpp, line 216
> > <http://git.reviewboard.kde.org/r/104025/diff/1/?file=50576#file50576line216>
> > 
> > Shall I remove this line, too?

no, I think this one can stay as it's the last major rule to throw out all windows \
which don't want to be shown in the switcher. It's not a check controlled by a config \
option like the other ones.


- Martin


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


On Feb. 21, 2012, 3:42 p.m., Stefano Avallone wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/104025/
> -----------------------------------------------------------
> 
> (Updated Feb. 21, 2012, 3:42 p.m.)
> 
> 
> Review request for kwin and Martin Gräßlin.
> 
> 
> Description
> -------
> 
> This patch refactors the checks for inclusion of TabBox clients in the client list. \
> All the checks have been implemented as dropdowns. Quoting Martin, the checks are: 
> * Desktop: Windows From All Desktops, Windows From Current Desktop
> * Activities: Windows From All Activities, Windows From Current Activity
> * Applications: All Windows From All Applications, Only one Window per
> Application, Only all Windows of Current Application
> * Minimized: Ignore, Minimized windows only, Exclude Minimized Windows
> * Desktop: Don't Show Desktop, Show Desktop to minimize all windows
> * Multi Screen: Ignore, Only Windows from current screen, Exclude windows from
> current screen
> 
> Each of such checks has been implemented as a private method of TabBoxHandlerImpl. \
> They are called by TabBoxHandlerImpl::clientToAddToList, while \
> ClientModel::createClientList only handles the switching mode \
> (FocusChain/StackingOrder) and whether a desktop client should be added to the list \
> to minimize all the clients. In TabBoxHandlerImpl::clientToAddToList, I left the \
> following line: 
> addClient = addClient && current->wantsTabFocus() && !current->skipSwitcher();
> 
> as I am not sure if it is needed or not.
> 
> The UI is a bit crowded now, but I would leave a UI refactor for a future commit.
> 
> 
> Diffs
> -----
> 
> kwin/kcmkwin/kwintabbox/main.cpp 3f047d1 
> kwin/kcmkwin/kwintabbox/main.ui a316b28 
> kwin/tabbox/clientmodel.cpp 4ca7fef 
> kwin/tabbox/declarative.cpp dd4f242 
> kwin/tabbox/tabbox.h 6d4e2b2 
> kwin/tabbox/tabbox.cpp 3f26397 
> kwin/tabbox/tabboxconfig.h 32facde 
> kwin/tabbox/tabboxconfig.cpp 9feaa16 
> kwin/tabbox/tabboxhandler.h 27b475a 
> 
> Diff: http://git.reviewboard.kde.org/r/104025/diff/
> 
> 
> Testing
> -------
> 
> Desktop, Minimized, Show desktop: work fine
> 
> Multi Screen: could not test, as I do not have a multi screen configuration
> 
> Activities: works fine. However, when using the present windows effect as task \
> switcher, the previews of the windows on other activities are not visible. They are \
> actually there, because moving the mouse to the area where they (presumably) are \
> makes the close button appear and allows to activate them. When using a layout \
> based switcher, thumbnails of windows on other activities are correctly shown. So, \
> I guess, it is something unrelated to the checks I made. 
> Applications: the new case I implemented is "Only all Windows of Current \
> Application" (others work fine). I tested it with KDevelop+About KDE+About \
> Kdevelop, and it works fine. It doesn't work with the three windows opened by Gimp, \
> in the sense that only one window (instead of all of them) is shown. Not sure if my \
> check is incorrect, here. 
> 
> Screenshots
> -----------
> 
> Modified UI
> http://git.reviewboard.kde.org/r/104025/s/438/
> 
> 
> Thanks,
> 
> Stefano Avallone
> 
> 


[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/104025/">http://git.reviewboard.kde.org/r/104025/</a>
  </td>
    </tr>
   </table>
   <br />








<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On February 29th, 2012, 6:01 p.m., <b>Stefano \
Avallone</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/104025/diff/1/?file=50576#file50576line216" \
style="color: black; font-weight: bold; text-decoration: \
underline;">kwin/tabbox/tabbox.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; \
">TabBoxClient* TabBoxHandlerImpl::activeClient() const</pre></td>

  </tr>
 </tbody>






 
 

 <tbody>

  <tr>
    <th bgcolor="#f0f0f0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">137</font></th>  <td bgcolor="#ffffff" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="n">addClient</span> <span class="o">=</span> <span class="n">addClient</span> \
<span class="o">&amp;&amp;</span> <span class="n">current</span><span \
class="o">-&gt;</span><span class="n">wantsTabFocus</span><span class="p">()</span> \
<span class="o">&amp;&amp;</span> <span class="o">!</span><span \
class="n">current</span><span class="o">-&gt;</span><span \
class="n">skipSwitcher</span><span class="p">();</span></pre></td>  <th \
bgcolor="#f0f0f0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">214</font></th>  <td bgcolor="#ffffff" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="n">addClient</span> <span class="o">=</span> <span class="n">addClient</span> \
<span class="o">&amp;&amp;</span> <span class="n">current</span><span \
class="o">-&gt;</span><span class="n">wantsTabFocus</span><span class="p">()</span> \
<span class="o">&amp;&amp;</span> <span class="o">!</span><span \
class="n">current</span><span class="o">-&gt;</span><span \
class="n">skipSwitcher</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;">Shall I remove this \
line, too?</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;">no, I think \
this one can stay as it&#39;s the last major rule to throw out all windows which \
don&#39;t want to be shown in the switcher. It&#39;s not a check controlled by a \
config option like the other ones.</pre> <br />




<p>- Martin</p>


<br />
<p>On February 21st, 2012, 3:42 p.m., Stefano Avallone 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 and Martin Gräßlin.</div>
<div>By Stefano Avallone.</div>


<p style="color: grey;"><i>Updated Feb. 21, 2012, 3:42 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 patch refactors the checks for inclusion of TabBox clients in the \
client list. All the checks have been implemented as dropdowns. Quoting Martin, the \
checks are:

* Desktop: Windows From All Desktops, Windows From Current Desktop
* Activities: Windows From All Activities, Windows From Current Activity
* Applications: All Windows From All Applications, Only one Window per
Application, Only all Windows of Current Application
* Minimized: Ignore, Minimized windows only, Exclude Minimized Windows
* Desktop: Don&#39;t Show Desktop, Show Desktop to minimize all windows
* Multi Screen: Ignore, Only Windows from current screen, Exclude windows from
current screen

Each of such checks has been implemented as a private method of TabBoxHandlerImpl. \
They are called by TabBoxHandlerImpl::clientToAddToList, while \
ClientModel::createClientList only handles the switching mode \
(FocusChain/StackingOrder) and whether a desktop client should be added to the list \
to minimize all the clients. In TabBoxHandlerImpl::clientToAddToList, I left the \
following line:

addClient = addClient &amp;&amp; current-&gt;wantsTabFocus() &amp;&amp; \
!current-&gt;skipSwitcher();

as I am not sure if it is needed or not.

The UI is a bit crowded now, but I would leave a UI refactor for a future \
commit.</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;">Desktop, Minimized, Show desktop: work fine

Multi Screen: could not test, as I do not have a multi screen configuration

Activities: works fine. However, when using the present windows effect as task \
switcher, the previews of the windows on other activities are not visible. They are \
actually there, because moving the mouse to the area where they (presumably) are \
makes the close button appear and allows to activate them. When using a layout based \
switcher, thumbnails of windows on other activities are correctly shown. So, I guess, \
it is something unrelated to the checks I made.

Applications: the new case I implemented is &quot;Only all Windows of Current \
Application&quot; (others work fine). I tested it with KDevelop+About KDE+About \
Kdevelop, and it works fine. It doesn&#39;t work with the three windows opened by \
Gimp, in the sense that only one window (instead of all of them) is shown. Not sure \
if my check is incorrect, here.</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/kcmkwin/kwintabbox/main.cpp <span style="color: grey">(3f047d1)</span></li>

 <li>kwin/kcmkwin/kwintabbox/main.ui <span style="color: grey">(a316b28)</span></li>

 <li>kwin/tabbox/clientmodel.cpp <span style="color: grey">(4ca7fef)</span></li>

 <li>kwin/tabbox/declarative.cpp <span style="color: grey">(dd4f242)</span></li>

 <li>kwin/tabbox/tabbox.h <span style="color: grey">(6d4e2b2)</span></li>

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

 <li>kwin/tabbox/tabboxconfig.h <span style="color: grey">(32facde)</span></li>

 <li>kwin/tabbox/tabboxconfig.cpp <span style="color: grey">(9feaa16)</span></li>

 <li>kwin/tabbox/tabboxhandler.h <span style="color: grey">(27b475a)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/104025/diff/" style="margin-left: \
3em;">View Diff</a></p>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Screenshots </h1>

<div>

 <a href="http://git.reviewboard.kde.org/r/104025/s/438/"><img \
src="http://git.reviewboard.kde.org/media/uploaded/images/2012/02/21/ui_400x100.jpeg" \
style="border: 1px black solid;" alt="Modified UI" /></a>

</div>


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