diff options
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r-- | sway/input/seat.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c index e7b6e0c5..b783a84f 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c | |||
@@ -1,6 +1,7 @@ | |||
1 | #define _XOPEN_SOURCE 700 | 1 | #define _XOPEN_SOURCE 700 |
2 | #define _POSIX_C_SOURCE 199309L | 2 | #define _POSIX_C_SOURCE 199309L |
3 | #include <assert.h> | 3 | #include <assert.h> |
4 | #include <errno.h> | ||
4 | #ifdef __linux__ | 5 | #ifdef __linux__ |
5 | #include <linux/input-event-codes.h> | 6 | #include <linux/input-event-codes.h> |
6 | #elif __FreeBSD__ | 7 | #elif __FreeBSD__ |
@@ -696,8 +697,14 @@ void seat_set_focus_warp(struct sway_seat *seat, | |||
696 | config->urgent_timeout > 0) { | 697 | config->urgent_timeout > 0) { |
697 | view->urgent_timer = wl_event_loop_add_timer(server.wl_event_loop, | 698 | view->urgent_timer = wl_event_loop_add_timer(server.wl_event_loop, |
698 | handle_urgent_timeout, view); | 699 | handle_urgent_timeout, view); |
699 | wl_event_source_timer_update(view->urgent_timer, | 700 | if (view->urgent_timer) { |
700 | config->urgent_timeout); | 701 | wl_event_source_timer_update(view->urgent_timer, |
702 | config->urgent_timeout); | ||
703 | } else { | ||
704 | wlr_log(WLR_ERROR, "Unable to create urgency timer (%s)", | ||
705 | strerror(errno)); | ||
706 | handle_urgent_timeout(view); | ||
707 | } | ||
701 | } else { | 708 | } else { |
702 | view_set_urgent(view, false); | 709 | view_set_urgent(view, false); |
703 | } | 710 | } |