summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2019-04-23 23:40:00 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2019-04-24 07:16:37 -0600
commitdc7a3930a7ffd4435c9215c7cce0afa37d06c91f (patch)
tree1b5f0bbbd832c7dc6b4407cd16dbc4ece26a666b /include
parentswaybar: hide mode visibility improvements (diff)
downloadsway-dc7a3930a7ffd4435c9215c7cce0afa37d06c91f.tar.gz
sway-dc7a3930a7ffd4435c9215c7cce0afa37d06c91f.tar.zst
sway-dc7a3930a7ffd4435c9215c7cce0afa37d06c91f.zip
swaybar: add multiseat support
This just adds multiseat support to swaybar
Diffstat (limited to 'include')
-rw-r--r--include/swaybar/bar.h4
-rw-r--r--include/swaybar/input.h13
2 files changed, 13 insertions, 4 deletions
diff --git a/include/swaybar/bar.h b/include/swaybar/bar.h
index 84619237..10984ab0 100644
--- a/include/swaybar/bar.h
+++ b/include/swaybar/bar.h
@@ -31,11 +31,8 @@ struct swaybar {
31 struct zwlr_layer_shell_v1 *layer_shell; 31 struct zwlr_layer_shell_v1 *layer_shell;
32 struct zxdg_output_manager_v1 *xdg_output_manager; 32 struct zxdg_output_manager_v1 *xdg_output_manager;
33 struct wl_shm *shm; 33 struct wl_shm *shm;
34 struct wl_seat *seat;
35 34
36 struct swaybar_config *config; 35 struct swaybar_config *config;
37 struct swaybar_pointer pointer;
38 struct swaybar_touch touch;
39 struct status_line *status; 36 struct status_line *status;
40 37
41 struct loop *eventloop; 38 struct loop *eventloop;
@@ -44,6 +41,7 @@ struct swaybar {
44 int ipc_socketfd; 41 int ipc_socketfd;
45 42
46 struct wl_list outputs; // swaybar_output::link 43 struct wl_list outputs; // swaybar_output::link
44 struct wl_list seats; // swaybar_seat::link
47 45
48#if HAVE_TRAY 46#if HAVE_TRAY
49 struct swaybar_tray *tray; 47 struct swaybar_tray *tray;
diff --git a/include/swaybar/input.h b/include/swaybar/input.h
index 88e5abc5..2d38f7a7 100644
--- a/include/swaybar/input.h
+++ b/include/swaybar/input.h
@@ -50,12 +50,23 @@ struct swaybar_hotspot {
50 void *data; 50 void *data;
51}; 51};
52 52
53struct swaybar_seat {
54 struct swaybar *bar;
55 uint32_t wl_name;
56 struct wl_seat *wl_seat;
57 struct swaybar_pointer pointer;
58 struct swaybar_touch touch;
59 struct wl_list link; // swaybar_seat:link
60};
61
53extern const struct wl_seat_listener seat_listener; 62extern const struct wl_seat_listener seat_listener;
54 63
55void update_cursor(struct swaybar *bar); 64void update_cursor(struct swaybar_seat *seat);
56 65
57uint32_t event_to_x11_button(uint32_t event); 66uint32_t event_to_x11_button(uint32_t event);
58 67
59void free_hotspots(struct wl_list *list); 68void free_hotspots(struct wl_list *list);
60 69
70void swaybar_seat_free(struct swaybar_seat *seat);
71
61#endif 72#endif