Review Request 108585: Fix screenlocker lockwindow geometry on screen resizes
Oliver Henshaw
oliver.henshaw at gmail.com
Mon Jan 28 14:57:33 UTC 2013
> On Jan. 26, 2013, 2:03 p.m., Oliver Henshaw wrote:
> > I don't have multiple monitors to test with, but can you test with the the LockWindow set to some colour other than black? Just so that any bizarre side effects are more obvious.
>
> Thomas Lübking wrote:
> What "bizarre side effects" would you expect?
> My screens are ok ;-P
>
> (I could see the clock from the WM on where the exposed area would have been and that area was now black)
>
> I'll try by a nice dodgerblue nevertheless.
>
> Oliver Henshaw wrote:
> I wanted to be completely sure that it is the lockwindow that is covering the screen and not some other component. Perhaps that's overly paranoid, but I suppose we should err towards the paranoid.
>
> Thomas Lübking wrote:
> Turns nicely blue, i also debugged me the geometry and that the slot is caught (twice for the screecount change AND the resize)
>
> Btw and while at it - the code is partially a bit "weird":
>
> QPalette p = palette();
> p.setColor(backgroundRole(), Qt::transparent); // this is what you got to turn blue
> ** Q: wtf is the background color "transparent" - this is black for 24bit, but guess what it is on a 32 drawable (hint: it's not pink)
> --> Reason?
> setPalette(p); // good
> setAttribute(Qt::WA_PaintOnScreen, true); // bypasses doublebuffer, saves RAM - good
> setAttribute(Qt::WA_NoSystemBackground, false); // iirc default, but good
> setAttribute(Qt::WA_PaintOutsidePaintEvent, true); // for bitBlt in resume()
> ** Q: what ::resume() and what bitBlt? - bitBlt is afair not evel legally supported since Qt 4 and "grep -r resume *" in the screenlocker path is this lone and a label content.
>
> void LockWindow::paintEvent(QPaintEvent* )
> {
> QPainter p(this);
> p.setBrush(Qt::black); // set only this to Qt::blue, attempt a resize (no matter on how many screens) and watch the result
> p.drawRect(geometry());
> }
>
> ** Q: "why"? - everything on top says "no paint events", so why is paintevent implemented at all (it will for other reasons once shadow the contents)
> ** Q: p.setPen(Qt::black)?
>
> Does anybody know about the legacy of this?
> Some Qt3 port that requires cleanup or is this to work-a-round special system issues?
> Quite some of it also is only supported on X11, not Windows or MacOS and i'm not sure about Wayland and Symbian.
>
> To test this, one btw. does not necessarily require a multiscreen setup - it's sufficient to "xrandr -s 1024x768", lock screen, VT1, export DISPLAY=:0; xrandr -s 0 and "sleep 5; pkill kscreenlocker_g" (or so) -> VT7, see lockwindow
suspend()/resume() seem to have been methods in the 4.9 krunner/lock to stop/start the 4.9 screensaver if e.g. it couldn't be seen.
The bitBlt comment was introduced in commit 71b8c4e239d1b9f7f4884d75afefda794e011034; the bitBlt use in resume() was removed/replaced in commit 2a23308ce7fb6f5918b3f7c25ed3b2a70cbcc0e7.
- Oliver
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/108585/#review26205
-----------------------------------------------------------
On Jan. 25, 2013, 11:04 p.m., Thomas Lübking wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/108585/
> -----------------------------------------------------------
>
> (Updated Jan. 25, 2013, 11:04 p.m.)
>
>
> Review request for kwin, Plasma, Aaron J. Seigo, and Martin Gräßlin.
>
>
> Description
> -------
>
> Actually was wrong, we do get the signals from QDesktopWidget - so the fix is pretty trivial ;-)
>
> Reg. bug #313835 i assume you're using some plasma screenlocker with widgets on it (which has a translucent background when compositing is active and relies on the lockwindow to cover the screen)
>
> I've not checked such screen"saver" and have to admit, i'd not even know where to check for the sources.
>
>
> This addresses bug 313835.
> http://bugs.kde.org/show_bug.cgi?id=313835
>
>
> Diffs
> -----
>
> ksmserver/screenlocker/lockwindow.h 5cbc769
> ksmserver/screenlocker/lockwindow.cpp 147853b
>
> Diff: http://git.reviewboard.kde.org/r/108585/diff/
>
>
> Testing
> -------
>
> recompiled _all_ ksmserver, logged out, in, locked the screen, updated the screen geometry ("arrrgghhh... geeezzz... goddamnfuckinghdmiinthedark"), killed the gretter (noticed that i could have simply xrandr'd the geometry from VT1 as well - "blast!")
>
> everything is nicely black (with compositing)
>
>
> Thanks,
>
> Thomas Lübking
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20130128/fd5d471e/attachment-0001.html>
More information about the Plasma-devel
mailing list