diff --git a/include/swaybar/input.h b/include/swaybar/input.h index a552e7aca..e83561889 100644 --- a/include/swaybar/input.h +++ b/include/swaybar/input.h @@ -8,9 +8,6 @@ struct swaybar_output; struct swaybar_pointer { struct wl_pointer *pointer; - struct wl_cursor_theme *cursor_theme; - struct wl_cursor_image *cursor_image; - struct wl_surface *cursor_surface; struct swaybar_output *current; int x, y; }; diff --git a/swaybar/bar.c b/swaybar/bar.c index 5e9767b27..e64509ddc 100644 --- a/swaybar/bar.c +++ b/swaybar/bar.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include "swaybar/bar.h" #include "swaybar/config.h" @@ -358,25 +357,6 @@ bool bar_setup(struct swaybar *bar, const char *socket_path) { } wl_display_roundtrip(bar->display); - struct swaybar_pointer *pointer = &bar->pointer; - - int max_scale = 1; - wl_list_for_each(output, &bar->outputs, link) { - if (output->scale > max_scale) { - max_scale = output->scale; - } - } - - pointer->cursor_theme = - wl_cursor_theme_load(NULL, 24 * max_scale, bar->shm); - assert(pointer->cursor_theme); - struct wl_cursor *cursor; - cursor = wl_cursor_theme_get_cursor(pointer->cursor_theme, "left_ptr"); - assert(cursor); - pointer->cursor_image = cursor->images[0]; - pointer->cursor_surface = wl_compositor_create_surface(bar->compositor); - assert(pointer->cursor_surface); - if (bar->config->workspace_buttons) { if (ipc_get_workspaces(bar)) { set_bar_dirty(bar); diff --git a/swaybar/input.c b/swaybar/input.c index 31137f448..d4c5def8f 100644 --- a/swaybar/input.c +++ b/swaybar/input.c @@ -5,7 +5,6 @@ #include #endif #include -#include #include #include "list.h" #include "log.h" @@ -66,20 +65,6 @@ static void wl_pointer_enter(void *data, struct wl_pointer *wl_pointer, break; } } - int max_scale = 1; - struct swaybar_output *_output; - wl_list_for_each(_output, &bar->outputs, link) { - if (_output->scale > max_scale) { - max_scale = _output->scale; - } - } - wl_surface_set_buffer_scale(pointer->cursor_surface, max_scale); - wl_surface_attach(pointer->cursor_surface, - wl_cursor_image_get_buffer(pointer->cursor_image), 0, 0); - wl_pointer_set_cursor(wl_pointer, serial, pointer->cursor_surface, - pointer->cursor_image->hotspot_x / max_scale, - pointer->cursor_image->hotspot_y / max_scale); - wl_surface_commit(pointer->cursor_surface); } static void wl_pointer_leave(void *data, struct wl_pointer *wl_pointer, diff --git a/swaybar/meson.build b/swaybar/meson.build index c27cf2c2f..3310ae857 100644 --- a/swaybar/meson.build +++ b/swaybar/meson.build @@ -20,7 +20,6 @@ executable( pangocairo, rt, wayland_client, - wayland_cursor, wlroots, ], link_with: [lib_sway_common, lib_sway_client],