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

List:       kwin
Subject:    Re: Review Request: Clear deleted window thumbnails
From:       Martin_Gräßlin <kde () martin-graesslin ! com>
Date:       2011-08-27 6:40:38
Message-ID: 20110827064038.32033.78139 () vidsolbach ! de
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


> On Aug. 26, 2011, 5:20 p.m., Thomas Lübking wrote:
> > kwin/effects/taskbarthumbnail/taskbarthumbnail.cpp, line 122
> > <http://git.reviewboard.kde.org/r/102445/diff/1/?file=32940#file32940line122>
> > 
> > No idea about the tabstrip, but this should in general likely be
> > 
> > effects->addRepaint(w->geometry());
> > 
> > yesno?
> > 

I think both is wrong as we need to repaint the thumbnail area. I'm pretty sure that \
it worked for sebas because on active the geometry of each window would include the \
thumbnail area.

Oh and obviously the easiest solution to the question would be: w->addRepaintFull() \
;-)


- Martin


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


On Aug. 26, 2011, 2:57 p.m., Sebastian Kügler wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/102445/
> -----------------------------------------------------------
> 
> (Updated Aug. 26, 2011, 2:57 p.m.)
> 
> 
> Review request for kwin.
> 
> 
> Summary
> -------
> 
> When thumbnails are shown and a window is deleted, only the other, still existing \
> windows are being repainted. The deleted window stays on the screen until \
> repainted. In the typical taskbar thumbnail case, that's not a problem, since the \
> thumbnail of a deleted window is just never shown (no tooltips in that case). 
> In the Windowstrip applet, which is used as application switcher in Active, when \
> the window strip is not as wide as the screen, the windows shift left, leave a \
> blank space on the right which doesn't get cleared, so a ghost of the window stays \
> on screen. 
> The patch addresses this by adding the rect of the vanishing window to the area to \
> repaint in the next frame, essentially clearing exactly the part that we want. 
> I'd like to commit to master and 4.7.
> 
> 
> Diffs
> -----
> 
> kwin/effects/taskbarthumbnail/taskbarthumbnail.cpp 7761ba5 
> 
> Diff: http://git.reviewboard.kde.org/r/102445/diff
> 
> 
> Testing
> -------
> 
> start plasma-contour, with 3 open windows, close on of them from the windowstrip.
> 
> Without the patch, you'll see 3 windows painted, the third of which gets cleared \
> only after an artificially triggered repaint, e.g. by dragging the rest of the \
> windows over it. 
> With the patch, behaviour is as expected, the preview of the rightmost window is \
> cleared. 
> 
> Thanks,
> 
> Sebastian
> 
> 


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








<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On August 26th, 2011, 5:20 p.m., <b>Thomas \
Lübking</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/102445/diff/1/?file=32940#file32940line122" \
style="color: black; font-weight: bold; text-decoration: \
underline;">kwin/effects/taskbarthumbnail/taskbarthumbnail.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 \
TaskbarThumbnailEffect::slotWindowAdded(EffectWindow* w)</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">122</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="n">effects</span><span class="o">-&gt;</span><span \
class="n">addRepaint</span><span class="p">(</span><span class="n">w</span><span \
class="o">-&gt;</span><span class="n">rect</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;">No idea about the \
tabstrip, but this should in general likely be

   effects-&gt;addRepaint(w-&gt;geometry());

yesno?
</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;">I think \
both is wrong as we need to repaint the thumbnail area. I&#39;m pretty sure that it \
worked for sebas because on active the geometry of each window would include the \
thumbnail area.

Oh and obviously the easiest solution to the question would be: \
w-&gt;addRepaintFull() ;-)</pre> <br />




<p>- Martin</p>


<br />
<p>On August 26th, 2011, 2:57 p.m., Sebastian Kügler 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 Sebastian Kügler.</div>


<p style="color: grey;"><i>Updated Aug. 26, 2011, 2:57 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;">When thumbnails are shown and a window is deleted, only the other, still \
existing windows are being repainted. The deleted window stays on the screen until \
repainted. In the typical taskbar thumbnail case, that&#39;s not a problem, since the \
thumbnail of a deleted window is just never shown (no tooltips in that case).

In the Windowstrip applet, which is used as application switcher in Active, when the \
window strip is not as wide as the screen, the windows shift left, leave a blank \
space on the right which doesn&#39;t get cleared, so a ghost of the window stays on \
screen.

The patch addresses this by adding the rect of the vanishing window to the area to \
repaint in the next frame, essentially clearing exactly the part that we want.

I&#39;d like to commit to master and 4.7.</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;">start plasma-contour, with 3 open windows, close on of them from the \
windowstrip.

Without the patch, you&#39;ll see 3 windows painted, the third of which gets cleared \
only after an artificially triggered repaint, e.g. by dragging the rest of the \
windows over it.

With the patch, behaviour is as expected, the preview of the rightmost window is \
cleared.</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/effects/taskbarthumbnail/taskbarthumbnail.cpp <span style="color: \
grey">(7761ba5)</span></li>

</ul>

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