screen_blanker: activate the window before hiding the cursor

In some situations an app launching in the background will steal our
status as the active application which causes HideCursor() to fail when
the screensaver resumes.  This is particularly noticeable when the
screen lock is used early in the boot and things like Tracker and
Deskbar are still launching.

Change-Id: I37c432d277ce30716b9c98ad6a500c9313cbea92
Reviewed-on: https://review.haiku-os.org/c/haiku/+/9045
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
Chris Roberts
2025-02-22 21:25:44 +00:00
committed by waddlesplash
parent e0ff6a67ac
commit 7aeeeccb9e
+2
View File
@@ -251,6 +251,8 @@ ScreenBlanker::MessageReceived(BMessage* message)
case kMsgResumeSaver:
{
if (fWindow->Lock()) {
// ensure that our window and application are active before calling HideCursor()
fWindow->Activate();
HideCursor();
fPasswordWindow->SetPassword("");
fPasswordWindow->Hide();