[prev in list] [next in list] [prev in thread] [next in thread]
List: kwin
Subject: Re: Review Request: Add screen as member to Toplevel instead of rechecking each time
From: Thomas_Lübking <thomas.luebking () web ! de>
Date: 2012-03-29 13:17:25
Message-ID: 20120329131725.2214.12017 () vidsolbach ! de
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
> On March 29, 2012, 8:28 a.m., Thomas Lübking wrote:
> > kwin/toplevel.cpp, line 51
> > <http://git.reviewboard.kde.org/r/104435/diff/1/?file=55132#file55132line51>
> >
> > Too late.
> > setGeometry and plainResize internally require the screen up-to-date at an \
> > earlier time as they emit that signal, so checkScreen has to be called there \
> > right after adjusting the geometry and before doing all the checkWorkspace, \
> > checkActiveScreen, updatedRules, ... whatever stuff.
>
> Martin Gräßlin wrote:
> ok, given that I will discard the review request. It's not worth it and I only \
> wanted the change if it is save. I can hopefully do my experiment without it :-)
Actually it probably is - eg. we currently update the stacking order for *every* \
geometry update while it's actually (probably ;-) only required on screen changes \
(so i wanted to "fix" that for 4.9 anyway)
We just have to "do it right"(tm) - in doubt i'll attempt to modify the patch in this \
regard.
- Thomas
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/104435/#review11971
-----------------------------------------------------------
On March 29, 2012, 6:45 a.m., Martin Gräßlin wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/104435/
> -----------------------------------------------------------
>
> (Updated March 29, 2012, 6:45 a.m.)
>
>
> Review request for kwin.
>
>
> Description
> -------
>
> When the getter for Toplevel's screen was invoked the screen was actually \
> calculated each time. Instead of this the number gets cached and only updated when \
> the Toplevel's geometry changes or the number of screens or their geometry.
> Why did I do this change? For something new I want to experiment with I need a \
> signal when the Toplevel's screen is changed.
>
> Diffs
> -----
>
> kwin/toplevel.h 32581a5
> kwin/toplevel.cpp 00bd7dd
>
> Diff: http://git.reviewboard.kde.org/r/104435/diff/
>
>
> Testing
> -------
>
> Currently running the patch on multi-screen setup and played around with resizing \
> and desktop grid. It's on top of the kephal patches so I am testing both.
>
> Thanks,
>
> Martin Gräßlin
>
>
[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/104435/">http://git.reviewboard.kde.org/r/104435/</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 29th, 2012, 8:28 a.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/104435/diff/1/?file=55132#file55132line51" \
style="color: black; font-weight: bold; text-decoration: \
underline;">kwin/toplevel.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; \
">Toplevel::Toplevel(Workspace* ws)</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">51</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span \
class="n">connect</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">geometryChanged</span><span class="p">()),</span> <span \
class="n">SLOT</span><span class="p">(</span><span class="n">checkScreen</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;">Too late. setGeometry \
and plainResize internally require the screen up-to-date at an earlier time as they \
emit that signal, so checkScreen has to be called there right after adjusting the \
geometry and before doing all the checkWorkspace, checkActiveScreen, updatedRules, \
... whatever stuff.</pre> </blockquote>
<p>On March 29th, 2012, 8:43 a.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;">ok, given that I will \
discard the review request. It's not worth it and I only wanted the change if it \
is save. I can hopefully do my experiment without it :-)</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;">Actually it \
probably is - eg. we currently update the stacking order for *every* geometry update \
while it's actually (probably ;-) only required on screen changes (so i wanted \
to "fix" that for 4.9 anyway)
We just have to "do it right"(tm) - in doubt i'll attempt to modify the \
patch in this regard.</pre> <br />
<p>- Thomas</p>
<br />
<p>On March 29th, 2012, 6:45 a.m., Martin Gräßlin 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 Martin Gräßlin.</div>
<p style="color: grey;"><i>Updated March 29, 2012, 6:45 a.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 the getter for Toplevel's screen was invoked the screen was \
actually calculated each time. Instead of this the number gets cached and only \
updated when the Toplevel's geometry changes or the number of screens or their \
geometry.
Why did I do this change? For something new I want to experiment with I need a signal \
when the Toplevel's screen is changed.</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;">Currently running the patch on multi-screen setup and played around with \
resizing and desktop grid. It's on top of the kephal patches so I am testing \
both.</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/toplevel.h <span style="color: grey">(32581a5)</span></li>
<li>kwin/toplevel.cpp <span style="color: grey">(00bd7dd)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/104435/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