mirror of
https://github.com/swaywm/sway.git
synced 2025-11-06 13:29:50 -05:00
Implement force_display_urgency_hint
The directive sets the timeout before an urgent view becomes normal again after switching to it from another workspace. Also: * When an xwayland surface removes the urgent hint while the timer is active, we now ignore the request. This happens as soon as the view receives focus, so it was effectively making the timer pointless. * The timeout is now only applied when switching to it from another workspace.
This commit is contained in:
parent
a2b2146f7f
commit
c2ed3d8bd6
8 changed files with 42 additions and 1 deletions
|
|
@ -442,6 +442,12 @@ static void handle_set_hints(struct wl_listener *listener, void *data) {
|
|||
if (!xsurface->mapped) {
|
||||
return;
|
||||
}
|
||||
if (!xsurface->hints_urgency && view->urgent_timer) {
|
||||
// The view is is in the timeout period. We'll ignore the request to
|
||||
// unset urgency so that the view remains urgent until the timer clears
|
||||
// it.
|
||||
return;
|
||||
}
|
||||
if (view->allow_request_urgent) {
|
||||
view_set_urgent(view, (bool)xsurface->hints_urgency);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue