aboutsummaryrefslogtreecommitdiff
path: root/sway/input/seat.c
diff options
context:
space:
mode:
authorBrian Ashworth <RedSoxFan@users.noreply.github.com>2018-07-20 21:46:56 -0400
committerGitHub <noreply@github.com>2018-07-20 21:46:56 -0400
commit51730a059778e1d91e2f4b412f39e77a66f48155 (patch)
tree1d043b7551e251f1b662e952e9f62be72877a7cc /sway/input/seat.c
parenta2b2146f7fb8d5e868880daff9484145a68ab4a3 (diff)
parent37b33f92e8cd94984c4e3c8c851f5dfdacbe14f5 (diff)
Merge pull request #2317 from RyanDwyer/force-display-urgency-hint
Implement force_display_urgency_hint
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r--sway/input/seat.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c
index eadf3b26..e77d88a8 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -677,14 +677,20 @@ void seat_set_focus_warp(struct sway_seat *seat,
}
}
- // If urgent, start a timer to unset it
+ // If urgent, either unset the urgency or start a timer to unset it
if (container && container->type == C_VIEW &&
view_is_urgent(container->sway_view) &&
!container->sway_view->urgent_timer) {
struct sway_view *view = container->sway_view;
- view->urgent_timer = wl_event_loop_add_timer(server.wl_event_loop,
- handle_urgent_timeout, view);
- wl_event_source_timer_update(view->urgent_timer, 1000);
+ if (last_workspace && last_workspace != new_workspace &&
+ config->urgent_timeout > 0) {
+ view->urgent_timer = wl_event_loop_add_timer(server.wl_event_loop,
+ handle_urgent_timeout, view);
+ wl_event_source_timer_update(view->urgent_timer,
+ config->urgent_timeout);
+ } else {
+ view_set_urgent(view, false);
+ }
}
// If we've focused a floating container, bring it to the front.