Bug 394249 - Logout screen countdown not cancelling on multi-monitor setups
Summary: Logout screen countdown not cancelling on multi-monitor setups
Alias: None
Product: ksmserver
Classification: Plasma
Component: general (show other bugs)
Version: 5.12.5
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Lubos Lunak
Depends on:
Reported: 2018-05-14 11:40 UTC by Mayeul C.
Modified: 2018-05-16 10:19 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:

Illustration: countdown is cancelled only on the left monitor (773.01 KB, image/png)
2018-05-14 11:40 UTC, Mayeul C.

Note You need to log in before you can comment on or make changes to this bug.
Description Mayeul C. 2018-05-14 11:40:28 UTC
Created attachment 112639 [details]
Illustration: countdown is cancelled only on the left monitor

This might be related to the look and feel package as well.

I would have tried to fix it myself, but I am not proficient enough with Qt/qml to easily pinpoint the problem.

On multi monitor setups, the logout overlay appears on every screen. There is one countdown per screen. Moving the selection with the keyboard arrow keys interrupt the countdown on one screen, but not the others, so the log out action ends up happening anyway.

It is supposed to cancel the action on every screen.

It would actually be nicer not to assume that a screen is the primary one, and show the exact same state on every screen, including selection and hover (even duplicating the mouse could be interesting). My primary monitor is the center one, but the selection is displayed on the leftmost one.

See the attached screenshot where only the leftmost screen has its countdown cancelled. (A bit of corruption is visible on the rightmost screen as well, I am using X, Qt 5.10.1, plasma 5.12.5)

Related files might be https://cgit.kde.org/plasma-workspace.git/tree/lookandfeel/contents/logout/Logout.qml and https://cgit.kde.org/plasma-workspace.git/tree/ksmserver/shutdowndlg.cpp
Comment 1 David Edmundson 2018-05-16 10:19:03 UTC
Git commit 38367efd5e9320b69f8771476d3c52921555a4e4 by David Edmundson.
Committed on 16/05/2018 at 10:18.
Pushed by davidedmundson into branch 'master'.

Fix Logout screen countdown not cancelling on multi-monitor setups

The logout greeter theme has a timer that invokes the current action if
no keyboard interaction has taken place.

This cancel on keyboard nav is broken on multiple monitor setups as even
if a user is interacting with one, the timer from another can still

Fix is via JS singleton library as the timer is very theme specific. I
didn't want to add anything in shutdowndlg.cpp as it would be breaking

Test Plan:
Had multi monitor setup
Pressed key on one screen. All timer UIs cleared, nothing happened after
30 seconds

Reviewers: #plasma

Subscribers: zzag, broulik, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D12893

M  +6    -0    lookandfeel/contents/logout/Logout.qml
M  +2    -1    lookandfeel/contents/logout/LogoutButton.qml
C  +16   -18   lookandfeel/contents/logout/timer.js [from: lookandfeel/contents/logout/LogoutButton.qml - 069% similarity]