summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2025-11-29 07:31:20 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2025-11-29 07:31:20 +0100
commit92a1558a0e7082e4c7462790643f0957fb887537 (patch)
treed5834b4d3643a0d09d9e423486c5ec25f74c3efc /src
parent940871d5c88cd32314b350986b70758b786c7cbe (diff)
Wayland: remove code path that left workarea_xywh[*] unassigned (#1334)
Diffstat (limited to 'src')
-rw-r--r--src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx5
1 files changed, 5 insertions, 0 deletions
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);
}