From 4b07ab391ac77e2996e61646a258064bb1cadfeb Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Wed, 19 Mar 2025 14:09:57 +0100 Subject: Fix "FLTK apps broken under LabWC compositor" (#1231) --- src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx | 4 ++++ 1 file changed, 4 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 f73639598..cdeeab9ac 100644 --- a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx @@ -1566,6 +1566,10 @@ static const struct xdg_surface_listener xdg_surface_listener = { static bool compute_full_and_maximized_areas(Fl_Wayland_Screen_Driver::output *output, int& Wfullscreen, int& Hfullscreen, int& Wworkarea, int& Hworkarea) { + if (Fl_Wayland_Screen_Driver::compositor == Fl_Wayland_Screen_Driver::unspecified) { + Wfullscreen = 0; + return false; + } bool found_workarea = false; Fl_Wayland_Screen_Driver *scr_driver = (Fl_Wayland_Screen_Driver*)Fl::screen_driver(); struct wl_surface *wl_surface = wl_compositor_create_surface(scr_driver->wl_compositor); -- cgit v1.2.3