[screenlocker] Delay uninhibiting sleep till the lock window is shown

Review Request #124912 - Created Aug. 25, 2015 and submitted

Martin Flöser
broulik, davidedmundson
LockWindow is mostly just the logic to ensure that the greeter is kept
on top of the stack. In addition it did render a black qwidget. Testing
showed that the paintEvent never got invoked, though, so the rendering
did not really work.

The rendering feature is now split out into a dedicated QRasterWindow
as we don't need a full QWidget for it. It also needed to be split into
a dedicated class as it's not possible to inherit from QSurface and mix
with XLib code (QSurface defines a Window type which bites with XLib).

[screenlocker] Emit locked once the lock window is shown

The screen is only truly locked once our black background window is
shown. So far we locked once the greeter process was started. At this
point the screen was still unlocked and a suspend would result in system
waking up with an unlocked screen for a brief period.

This change emits the locked signal once we got a MapNotify event for
our black background window which means the screen is properly turned
black and we can allow e.g. going to suspend.

Added debug statements, tail -f on .xsession-errors:
we call uninhibit before system goes to suspend

Unfortunately on wakeup I still see a flicker of the desktop. I'm not sure where it comes from, I assume X weirdness on resume from suspend.


  • 3
  • 0
  • 0
  • 3
Description From Last Updated
this is a pretty silly class name now, given it's not a window David Edmundson David Edmundson
I know you're just editing it, but having just hidden the background window, we then set a background colour and ... David Edmundson David Edmundson
we can move this to background window constructor David Edmundson David Edmundson
Martin Flöser
David Edmundson
David Edmundson
Martin Flöser
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted with commit 1be3ba05370b4f9e9f7515ca8035883ac2da341b by Martin Gräßlin to branch master.