From 92a1558a0e7082e4c7462790643f0957fb887537 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Sat, 29 Nov 2025 07:31:20 +0100 Subject: Wayland: remove code path that left workarea_xywh[*] unassigned (#1334) --- src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx index b3d58a5ff..2a8013270 100644 --- a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx @@ -1657,6 +1657,7 @@ static int workarea_xywh[4] = { -1, -1, -1, -1 }; void Fl_Wayland_Screen_Driver::init_workarea() { wl_display_roundtrip(Fl_Wayland_Screen_Driver::wl_display); // important after screen removal + bool need_init_workarea = true; Fl_Wayland_Screen_Driver::output *output; wl_list_for_each(output, &outputs, link) { int Wfullscreen, Hfullscreen, Wworkarea, Hworkarea; @@ -1669,9 +1670,13 @@ void Fl_Wayland_Screen_Driver::init_workarea() workarea_xywh[1] = output->y; // pixels workarea_xywh[2] = Wworkarea * output->wld_scale; // pixels workarea_xywh[3] = Hworkarea * output->wld_scale; // pixels + need_init_workarea = false; } } } + if (need_init_workarea) { + screen_xywh(workarea_xywh[0], workarea_xywh[1], workarea_xywh[2], workarea_xywh[3], 0); + } Fl::handle(FL_SCREEN_CONFIGURATION_CHANGED, NULL); } -- cgit v1.2.3