diff options
Diffstat (limited to 'swaybar/input.c')
-rw-r--r-- | swaybar/input.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/swaybar/input.c b/swaybar/input.c index 1e6ace00..ada4bc86 100644 --- a/swaybar/input.c +++ b/swaybar/input.c | |||
@@ -111,7 +111,7 @@ static void wl_pointer_enter(void *data, struct wl_pointer *wl_pointer, | |||
111 | struct swaybar_pointer *pointer = &seat->pointer; | 111 | struct swaybar_pointer *pointer = &seat->pointer; |
112 | seat->pointer.x = wl_fixed_to_double(surface_x); | 112 | seat->pointer.x = wl_fixed_to_double(surface_x); |
113 | seat->pointer.y = wl_fixed_to_double(surface_y); | 113 | seat->pointer.y = wl_fixed_to_double(surface_y); |
114 | pointer->serial = serial; | 114 | |
115 | struct swaybar_output *output; | 115 | struct swaybar_output *output; |
116 | wl_list_for_each(output, &seat->bar->outputs, link) { | 116 | wl_list_for_each(output, &seat->bar->outputs, link) { |
117 | if (output->surface == surface) { | 117 | if (output->surface == surface) { |
@@ -119,7 +119,18 @@ static void wl_pointer_enter(void *data, struct wl_pointer *wl_pointer, | |||
119 | break; | 119 | break; |
120 | } | 120 | } |
121 | } | 121 | } |
122 | update_cursor(seat); | 122 | |
123 | if (seat->bar->cursor_shape_manager) { | ||
124 | struct wp_cursor_shape_device_v1 *device = | ||
125 | wp_cursor_shape_manager_v1_get_pointer( | ||
126 | seat->bar->cursor_shape_manager, wl_pointer); | ||
127 | wp_cursor_shape_device_v1_set_shape(device, serial, | ||
128 | WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_DEFAULT); | ||
129 | wp_cursor_shape_device_v1_destroy(device); | ||
130 | } else { | ||
131 | pointer->serial = serial; | ||
132 | update_cursor(seat); | ||
133 | } | ||
123 | } | 134 | } |
124 | 135 | ||
125 | static void wl_pointer_leave(void *data, struct wl_pointer *wl_pointer, | 136 | static void wl_pointer_leave(void *data, struct wl_pointer *wl_pointer, |