From 3d0b96b095443570831affbde4f0e3327c7d6295 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Mon, 13 Feb 2023 16:54:16 +0100 Subject: Remove unneeded list of wayland seats --- src/drivers/Wayland/Fl_Wayland_Screen_Driver.H | 1 - src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx | 7 ++----- 2 files changed, 2 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.H b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.H index 06545165d..f0bf11431 100644 --- a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.H +++ b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.H @@ -98,7 +98,6 @@ public: struct wl_compositor *wl_compositor; struct wl_subcompositor *wl_subcompositor; struct wl_shm *wl_shm; - struct wl_list seats; struct seat *seat; struct wl_list outputs; // linked list of all screens in system struct output { // one record for each screen diff --git a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx index 9bdee61b0..f25afbad4 100644 --- a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx @@ -403,6 +403,7 @@ static void init_cursors(struct seat *seat); static void try_update_cursor(struct seat *seat) { + if (wl_list_empty(&seat->pointer_outputs)) return; struct pointer_output *pointer_output; int scale = 1; @@ -936,7 +937,6 @@ static void output_done(void *data, struct wl_output *wl_output) { Fl_Wayland_Screen_Driver::output *output = (Fl_Wayland_Screen_Driver::output*)data; Fl_Wayland_Window_Driver::window_output *window_output; - struct seat *seat; //fprintf(stderr, "output_done output=%p\n",output); Fl_X *xp = Fl_X::first; while (xp) { // all mapped windows @@ -951,9 +951,7 @@ static void output_done(void *data, struct wl_output *wl_output) } Fl_Wayland_Screen_Driver *scr_driver = (Fl_Wayland_Screen_Driver*)Fl::screen_driver(); - wl_list_for_each(seat, &(scr_driver->seats), link) { - try_update_cursor(seat); - } + if (scr_driver->seat) try_update_cursor(scr_driver->seat); scr_driver->init_workarea(); Fl::handle(FL_SCREEN_CONFIGURATION_CHANGED, NULL); } @@ -1135,7 +1133,6 @@ void Fl_Wayland_Screen_Driver::open_display_platform() { } } //puts("Using Wayland backend"); - wl_list_init(&seats); wl_list_init(&outputs); wl_registry = wl_display_get_registry(wl_display); -- cgit v1.2.3