diff options
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r-- | sway/input/seat.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c index 82f4eb5f..a84e4d52 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c | |||
@@ -100,22 +100,11 @@ void seat_destroy(struct sway_seat *seat) { | |||
100 | 100 | ||
101 | void seat_idle_notify_activity(struct sway_seat *seat, | 101 | void seat_idle_notify_activity(struct sway_seat *seat, |
102 | enum sway_input_idle_source source) { | 102 | enum sway_input_idle_source source) { |
103 | uint32_t mask = seat->idle_inhibit_sources; | 103 | if ((source & seat->idle_inhibit_sources) == 0) { |
104 | struct wlr_idle_timeout *timeout; | 104 | return; |
105 | int ntimers = 0, nidle = 0; | ||
106 | wl_list_for_each(timeout, &server.idle->idle_timers, link) { | ||
107 | ++ntimers; | ||
108 | if (timeout->idle_state) { | ||
109 | ++nidle; | ||
110 | } | ||
111 | } | ||
112 | if (nidle == ntimers) { | ||
113 | mask = seat->idle_wake_sources; | ||
114 | } | ||
115 | if ((source & mask) > 0) { | ||
116 | wlr_idle_notify_activity(server.idle, seat->wlr_seat); | ||
117 | wlr_idle_notifier_v1_notify_activity(server.idle_notifier_v1, seat->wlr_seat); | ||
118 | } | 105 | } |
106 | wlr_idle_notify_activity(server.idle, seat->wlr_seat); | ||
107 | wlr_idle_notifier_v1_notify_activity(server.idle_notifier_v1, seat->wlr_seat); | ||
119 | } | 108 | } |
120 | 109 | ||
121 | /** | 110 | /** |