[prev in list] [next in list] [prev in thread] [next in thread]
List: kwin
Subject: Re: Review Request: Be sure that not allow off screen windows (XRandR
From: "Alex Fiestas" <alex () eyeos ! org>
Date: 2011-07-25 20:40:20
Message-ID: 20110725204020.4043.37817 () vidsolbach ! de
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
> On July 24, 2011, 6:29 p.m., Martin Gräßlin wrote:
> > I would like someone with Twinview trying it before it goes into master. @Thomas \
> > any chance? If not I will have time for that in one week from now
>
> Thomas Lübking wrote:
> You're pretty lucky since i've another monitor standing 2 meters away (so i don't \
> have to walk downstairs)
> *sigh* - i'll attach it then... ;-)
>
> Thomas Lübking wrote:
> Maybe i'm missing something important but the behaviour on TwinView is no different \
> between 4.6.5 and this patch (applied to master)
> Leaving aside the the "wrong" screen is preserved (ie. like the remaining screen is \
> merged into the hooked off and the result moved to the remaining screen - this \
> might be related to the pos. I added/removed the left one) all clients remain in \
> screen bounds.
> Alex Fiestas wrote:
> The windows should not be maximized in anyway to reproduce this bug, and not \
> touching any screen border.
> Thomas Lübking wrote:
> "maximized" ... hey..!!! there's no reason to insult me :-P
>
> With some more experience in multiscreen setups ("fixing" my desktop shell... :) \
> and looking at the patch it was pretty clear that I had to toggle the right screen \
> to trigger this.
> The patch indeed fixes this, but
> a) some rather formal complaints from my side ;-)
> (your moveLeft() call however is wrong regardless of what the behaviour shall be - \
> it assumes .x() == 0)
> b) the behaviour in general isn't optimal since apparently only the rect is \
> contrained instead of fixing the position of the windows on the lost screen (hits \
> you when removing the left screen)
> No idea whether this information ("which screen was removed") though and the \
> patched version is obviously better than what we have so please check the comments \
> and the you got a "ship it!" from here as well.
Tomorrow I will recheck everything related with this, including the moveLeft, and \
push the change.
I know that this is not optimal, this fix is thought for 4.7 only, for 4.8 I plan to \
fix this properly.
- Alex
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/101969/#review5055
-----------------------------------------------------------
On July 16, 2011, 1:58 p.m., Alex Fiestas wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/101969/
> -----------------------------------------------------------
>
> (Updated July 16, 2011, 1:58 p.m.)
>
>
> Review request for kwin.
>
>
> Summary
> -------
>
> When messing around with XRandR you typically end up with windows off screen. The \
> current XRandR handling of KWin is kinda messy right now since it relays everything \
> into one method (checkWorkspacePosition) which seems to be broken for this use case \
> since what is considered "oldScreen" properties are really not old but new, so the \
> checks fail.
> We've late to fix this for 4.7 (as discussed with Martin), but at least we can add \
> a workaround in this central method to be sure that no window is left offscreen. \
> This is what this patch add.
> Also, as you can see in the patch, if a window is detected offscreen it will be \
> moved to the last quarter of the screen. This behavior is copied from another \
> operating system and I like it very much since it is less intrusive than let's say \
> put the window centered on the screen (that was my first approach). Anyway if you \
> don't like this behavior I can change it to whatever you like.
>
> Diffs
> -----
>
> kwin/geometry.cpp 04c7b9d
>
> Diff: http://git.reviewboard.kde.org/r/101969/diff
>
>
> Testing
> -------
>
> I have been using this patch for a week now, I'm a heavy user of XRandR and I test \
> this with: 1-Desktop extended to the left/right and top
> 2-With one desktop changing the orientation
>
> Everything seems to work.
>
>
> Thanks,
>
> Alex
>
>
[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/101969/">http://git.reviewboard.kde.org/r/101969/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <p style="margin-top: 0;">On July 24th, 2011, 6:29 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;">I would like someone with Twinview trying it before it goes into master. \
@Thomas any chance? If not I will have time for that in one week from now</pre> \
</blockquote>
<p>On July 24th, 2011, 7:47 p.m., <b>Thomas Lübking</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;">You're pretty lucky \
since i've another monitor standing 2 meters away (so i don't have to walk \
downstairs)
*sigh* - i'll attach it then... ;-)</pre>
</blockquote>
<p>On July 24th, 2011, 10:56 p.m., <b>Thomas Lübking</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;">Maybe i'm missing \
something important but the behaviour on TwinView is no different between 4.6.5 and \
this patch (applied to master)
Leaving aside the the "wrong" screen is preserved (ie. like the remaining \
screen is merged into the hooked off and the result moved to the remaining screen - \
this might be related to the pos. I added/removed the left one) all clients remain in \
screen bounds.</pre> </blockquote>
<p>On July 25th, 2011, 6:11 p.m., <b>Alex Fiestas</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;">The windows should not \
be maximized in anyway to reproduce this bug, and not touching any screen \
border.</pre> </blockquote>
<p>On July 25th, 2011, 6:41 p.m., <b>Thomas Lübking</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;">"maximized" \
... hey..!!! there's no reason to insult me :-P
With some more experience in multiscreen setups ("fixing" my desktop \
shell... :) and looking at the patch it was pretty clear that I had to toggle the \
right screen to trigger this.
The patch indeed fixes this, but
a) some rather formal complaints from my side ;-)
(your moveLeft() call however is wrong regardless of what the behaviour shall be - it \
assumes .x() == 0)
b) the behaviour in general isn't optimal since apparently only the rect is \
contrained instead of fixing the position of the windows on the lost screen (hits you \
when removing the left screen)
No idea whether this information ("which screen was removed") though and \
the patched version is obviously better than what we have so please check the \
comments and the you got a "ship it!" from here as well.</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;">Tomorrow I will recheck \
everything related with this, including the moveLeft, and push the change.
I know that this is not optimal, this fix is thought for 4.7 only, for 4.8 I plan to \
fix this properly.</pre> <br />
<p>- Alex</p>
<br />
<p>On July 16th, 2011, 1:58 p.m., Alex Fiestas 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 Alex Fiestas.</div>
<p style="color: grey;"><i>Updated July 16, 2011, 1:58 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 messing around with XRandR you typically end up with windows off \
screen. The current XRandR handling of KWin is kinda messy right now since it relays \
everything into one method (checkWorkspacePosition) which seems to be broken for this \
use case since what is considered "oldScreen" properties are really not old \
but new, so the checks fail.
We've late to fix this for 4.7 (as discussed with Martin), but at least we can \
add a workaround in this central method to be sure that no window is left offscreen. \
This is what this patch add.
Also, as you can see in the patch, if a window is detected offscreen it will be moved \
to the last quarter of the screen. This behavior is copied from another operating \
system and I like it very much since it is less intrusive than let's say put the \
window centered on the screen (that was my first approach). Anyway if you don't \
like this behavior I can change it to whatever you like. </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;">I have been using this patch for a week now, I'm a heavy user of \
XRandR and I test this with: 1-Desktop extended to the left/right and top
2-With one desktop changing the orientation
Everything seems to work.
</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/geometry.cpp <span style="color: grey">(04c7b9d)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/101969/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