aboutsummaryrefslogtreecommitdiffstats
path: root/include/sway/input/switch.h
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2019-07-09 02:57:59 -0400
committerLibravatar Simon Ser <contact@emersion.fr>2019-07-09 10:00:57 +0300
commit152e30c374382eecccb917e5c26d72a2ea53ef87 (patch)
tree9baab29c015d6246c0a00e1d596c54ced0e7384b /include/sway/input/switch.h
parentMake mouse drag in tiled mode swap containers if no edge is selected (diff)
downloadsway-152e30c374382eecccb917e5c26d72a2ea53ef87.tar.gz
sway-152e30c374382eecccb917e5c26d72a2ea53ef87.tar.zst
sway-152e30c374382eecccb917e5c26d72a2ea53ef87.zip
cmd_bindswitch: add option to execute on reload
This adds a --reload flag to cmd_bindswitch that allows for the binding to be executed on reload. One possible use case for this is to allow users to disable outputs when the lid closes and enable them when the lid opens without having to open and re-close the lid after a reload.
Diffstat (limited to 'include/sway/input/switch.h')
-rw-r--r--include/sway/input/switch.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/sway/input/switch.h b/include/sway/input/switch.h
index 19bb1e77..213b471d 100644
--- a/include/sway/input/switch.h
+++ b/include/sway/input/switch.h
@@ -4,16 +4,20 @@
4#include "sway/input/seat.h" 4#include "sway/input/seat.h"
5 5
6struct sway_switch { 6struct sway_switch {
7 struct sway_seat_device *seat_device; 7 struct sway_seat_device *seat_device;
8 enum wlr_switch_state state;
9 enum wlr_switch_type type;
8 10
9 struct wl_listener switch_toggle; 11 struct wl_listener switch_toggle;
10}; 12};
11 13
12struct sway_switch *sway_switch_create(struct sway_seat *seat, 14struct sway_switch *sway_switch_create(struct sway_seat *seat,
13 struct sway_seat_device *device); 15 struct sway_seat_device *device);
14 16
15void sway_switch_configure(struct sway_switch *sway_switch); 17void sway_switch_configure(struct sway_switch *sway_switch);
16 18
17void sway_switch_destroy(struct sway_switch *sway_switch); 19void sway_switch_destroy(struct sway_switch *sway_switch);
18 20
21void sway_switch_retrigger_bindings_for_all(void);
22
19#endif 23#endif