Support “App not responding” prompt on Wayland and modernize its UI
Right now, when closing a Wayland client that’s unresponsive, it would just get killed by us after a few seconds without confirmation. This adds support for the “killer” helper to work with Wayland clients, too, (by using XDG Foreign to attach it to the window in question), and modernize its UI:
Introduce KillPrompt class
This encapsulates running and querying for the killer helper and allows to more easily re-use it for Wayland windows.
xdgshell: Use killPingTimeout option
This makes it consistent with the timeout used on X11.
The current ping timeout was also generally quite short, causing apps to desaturate for brief moments when they were busy e.g. starting up or loading large files.
xdgactivationv1: Allow explicitly overriding "showNotify" attribute
For internal purposes (e.g. showing the kill prompt) it can be undesirable to briefly see a startup feedback cursor.
xdgforeign: Allow exporting surfaces internally
Without a client asking for it. This way we can send a surface to another helper application, such as the window killer.
Support kill prompt for XdgTopLevelWindows
Instead of killing the window without asking, show the kill prompt like it's done for X11 windows.
The window in question is exported through XDG foreign so the kill helper can parent itself to it, and an activation token is also provided.
Also, the more contemporary desktop file name is now used for identification rather than window class.
helpers/killer: Modernize UI
This overhauls the kill prompt UI to make it more modern and more easily to grasp.
-
Reduce the amount of text and redundancy. Give the window a title and drop the "app is not responding" heading. Try to remove the application name from the displayed window title. Also use the bold emphasis used in other places like deleting files.
-
Use the application icon if available. While it is a dangerous operation that justifies the
dialog-warning
icon, the default is also "Wait longer". Using the application icon makes it easier to grasp which application it's talking about. -
Move technical information (like PID and hostname) into an expandable "Details" section.
SIGSTOP
’ing apps has never been more fun!
Before Before:
No dialog
Before (old design):
After (latest iteration):
After (new design):
(needs frameworks/kwidgetsaddons!227 (merged) for the details to show as simple label)