diff options
author | Ryan Walklin <ryan@testtoast.com> | 2019-03-20 14:47:29 +1100 |
---|---|---|
committer | Brian Ashworth <bosrsf04@gmail.com> | 2019-03-19 23:58:47 -0400 |
commit | bdb402404cd6d54242b0b1dc2360cfc5679e52f2 (patch) | |
tree | 5a355e025c24b3de0bc69db4b8cc9d002bbd1167 /include/sway/input/seat.h | |
parent | Clean up focus follows mouse logic (diff) | |
download | sway-bdb402404cd6d54242b0b1dc2360cfc5679e52f2.tar.gz sway-bdb402404cd6d54242b0b1dc2360cfc5679e52f2.tar.zst sway-bdb402404cd6d54242b0b1dc2360cfc5679e52f2.zip |
Support WLR_INPUT_DEVICE_SWITCH in sway
This commit adds support for laptop lid and tablet
mode switches as provided by evdev/libinput and
handled by wlroots.
Adds a new bindswitch command with syntax:
bindswitch <switch>:<state> <command>
Where <switch> is one of:
tablet for WLR_SWITCH_TYPE_TABLET_MODE
lid for WLR_SWITCH_TYPE_LID
<state> is one of:
on for WLR_SWITCH_STATE_ON
off for WLR_SWITCH_STATE_OFF
toggle for WLR_SWITCH_STATE_TOGGLE
(Note that WLR_SWITCH_STATE_TOGGLE doesn't map to
libinput and will trigger at both on and off events)
Diffstat (limited to 'include/sway/input/seat.h')
-rw-r--r-- | include/sway/input/seat.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sway/input/seat.h b/include/sway/input/seat.h index a5361e8c..f2af1066 100644 --- a/include/sway/input/seat.h +++ b/include/sway/input/seat.h | |||
@@ -27,6 +27,7 @@ struct sway_seat_device { | |||
27 | struct sway_seat *sway_seat; | 27 | struct sway_seat *sway_seat; |
28 | struct sway_input_device *input_device; | 28 | struct sway_input_device *input_device; |
29 | struct sway_keyboard *keyboard; | 29 | struct sway_keyboard *keyboard; |
30 | struct sway_switch *switch_device; | ||
30 | struct wl_list link; // sway_seat::devices | 31 | struct wl_list link; // sway_seat::devices |
31 | }; | 32 | }; |
32 | 33 | ||