diff options
author | Drew DeVault <sir@cmpwn.com> | 2019-12-11 11:00:39 -0500 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-12-12 10:37:30 -0500 |
commit | 2f3c6cccf5d6b2d6ffd3cee62e7b624dc80dc6e6 (patch) | |
tree | 69d3367cf7dbd7f756d45d89cd37e6016503a88d /sway/input/switch.c | |
parent | f645f8efd688104cdeac01cd940b32a8ff978571 (diff) |
Add seat <seat> idle_{inhibit,wake} <sources...>
This adds seat configuration options which can be used to configure what
events affect the idle behavior of sway.
An example use-case is mobile devices: you would remove touch from the
list of idle_wake events. This allows the phone to stay on while you're
actively using it, but doesn't wake from idle on touch events while it's
sleeping in your pocket.
Diffstat (limited to 'sway/input/switch.c')
-rw-r--r-- | sway/input/switch.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sway/input/switch.c b/sway/input/switch.c index 72d1245f..b7c28df1 100644 --- a/sway/input/switch.c +++ b/sway/input/switch.c @@ -70,8 +70,8 @@ static void handle_switch_toggle(struct wl_listener *listener, void *data) { struct sway_switch *sway_switch = wl_container_of(listener, sway_switch, switch_toggle); struct wlr_event_switch_toggle *event = data; - struct wlr_seat* wlr_seat = sway_switch->seat_device->sway_seat->wlr_seat; - wlr_idle_notify_activity(server.idle, wlr_seat); + struct sway_seat *seat = sway_switch->seat_device->sway_seat; + seat_idle_notify_activity(seat, IDLE_SOURCE_SWITCH); struct wlr_input_device *wlr_device = sway_switch->seat_device->input_device->wlr_device; |