aboutsummaryrefslogtreecommitdiff
path: root/include/swaybar
diff options
context:
space:
mode:
authorBrian Ashworth <bosrsf04@gmail.com>2019-04-23 23:40:00 -0400
committerDrew DeVault <sir@cmpwn.com>2019-04-24 07:16:37 -0600
commitdc7a3930a7ffd4435c9215c7cce0afa37d06c91f (patch)
tree1b5f0bbbd832c7dc6b4407cd16dbc4ece26a666b /include/swaybar
parent583ceff6f6129b5c569ad1eb499cffc526a14d1c (diff)
swaybar: add multiseat support
This just adds multiseat support to swaybar
Diffstat (limited to 'include/swaybar')
-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 {
struct zwlr_layer_shell_v1 *layer_shell;
struct zxdg_output_manager_v1 *xdg_output_manager;
struct wl_shm *shm;
- struct wl_seat *seat;
struct swaybar_config *config;
- struct swaybar_pointer pointer;
- struct swaybar_touch touch;
struct status_line *status;
struct loop *eventloop;
@@ -44,6 +41,7 @@ struct swaybar {
int ipc_socketfd;
struct wl_list outputs; // swaybar_output::link
+ struct wl_list seats; // swaybar_seat::link
#if HAVE_TRAY
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 {
void *data;
};
+struct swaybar_seat {
+ struct swaybar *bar;
+ uint32_t wl_name;
+ struct wl_seat *wl_seat;
+ struct swaybar_pointer pointer;
+ struct swaybar_touch touch;
+ struct wl_list link; // swaybar_seat:link
+};
+
extern const struct wl_seat_listener seat_listener;
-void update_cursor(struct swaybar *bar);
+void update_cursor(struct swaybar_seat *seat);
uint32_t event_to_x11_button(uint32_t event);
void free_hotspots(struct wl_list *list);
+void swaybar_seat_free(struct swaybar_seat *seat);
+
#endif