From f121bc1c7eccea246a794059bea9cf256f644a35 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Thu, 2 Apr 2026 12:21:21 +0200 Subject: [PATCH] Wayland: call libdecor_unref() at end of program as required by libdecor. --- src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx index c5e6deec5..9cd312f6c 100644 --- a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx @@ -1489,6 +1489,11 @@ static void do_atexit() { if (Fl_Wayland_Screen_Driver::wl_display) { wl_display_roundtrip(Fl_Wayland_Screen_Driver::wl_display); } + Fl_Wayland_Screen_Driver *scr_driver = (Fl_Wayland_Screen_Driver*)Fl::screen_driver(); + if (scr_driver->libdecor_context) { + libdecor_unref(scr_driver->libdecor_context); + scr_driver->libdecor_context = NULL; + } }