aboutsummaryrefslogtreecommitdiffstats
path: root/swaynag
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2018-12-15 03:31:15 -0500
committerLibravatar emersion <contact@emersion.fr>2018-12-15 09:51:44 +0100
commitc8284176dbc74acbf113c2d026124bf87cf8d5d3 (patch)
tree623556683abf2da579ce4ca79fbc196a2366ba03 /swaynag
parentswaybar: fix cursor scale (diff)
downloadsway-c8284176dbc74acbf113c2d026124bf87cf8d5d3.tar.gz
sway-c8284176dbc74acbf113c2d026124bf87cf8d5d3.tar.zst
sway-c8284176dbc74acbf113c2d026124bf87cf8d5d3.zip
swaynag: damage the cursor surface on update
When the cursor surface gets updated, it should be damaged. This also bumps up `wl_compositor` to version 4 to be able to use `wl_surface_damage_buffer`.
Diffstat (limited to 'swaynag')
-rw-r--r--swaynag/swaynag.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/swaynag/swaynag.c b/swaynag/swaynag.c
index e6dfd25f..2fc2416f 100644
--- a/swaynag/swaynag.c
+++ b/swaynag/swaynag.c
@@ -129,6 +129,8 @@ static void update_cursor(struct swaynag *swaynag) {
129 pointer->cursor_surface, 129 pointer->cursor_surface,
130 pointer->cursor_image->hotspot_x / swaynag->scale, 130 pointer->cursor_image->hotspot_x / swaynag->scale,
131 pointer->cursor_image->hotspot_y / swaynag->scale); 131 pointer->cursor_image->hotspot_y / swaynag->scale);
132 wl_surface_damage_buffer(pointer->cursor_surface, 0, 0,
133 INT32_MAX, INT32_MAX);
132 wl_surface_commit(pointer->cursor_surface); 134 wl_surface_commit(pointer->cursor_surface);
133} 135}
134 136
@@ -293,7 +295,7 @@ static void handle_global(void *data, struct wl_registry *registry,
293 struct swaynag *swaynag = data; 295 struct swaynag *swaynag = data;
294 if (strcmp(interface, wl_compositor_interface.name) == 0) { 296 if (strcmp(interface, wl_compositor_interface.name) == 0) {
295 swaynag->compositor = wl_registry_bind(registry, name, 297 swaynag->compositor = wl_registry_bind(registry, name,
296 &wl_compositor_interface, 3); 298 &wl_compositor_interface, 4);
297 } else if (strcmp(interface, wl_seat_interface.name) == 0) { 299 } else if (strcmp(interface, wl_seat_interface.name) == 0) {
298 swaynag->seat = wl_registry_bind(registry, name, &wl_seat_interface, 1); 300 swaynag->seat = wl_registry_bind(registry, name, &wl_seat_interface, 1);
299 wl_seat_add_listener(swaynag->seat, &seat_listener, swaynag); 301 wl_seat_add_listener(swaynag->seat, &seat_listener, swaynag);