commit fa1d09b1068456b5245070b25b4de48cb3ab1615
Author: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Mon Aug 25 16:23:54 2025 +0200
Commit: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Mon Aug 25 16:24:17 2025 +0200
Fix "Wayland libdecor crashes with built-in one." (#1299)
src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx | 3 +++
1 file changed, 3 insertions(+)
diff --git src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
index 5cba874..dd7761d 100644
--- src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
+++ src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
@@ -1734,6 +1734,9 @@ void Fl_Wayland_Window_Driver::fullscreen_on() {
void Fl_Wayland_Window_Driver::fullscreen_off(int X, int Y, int W, int H) {
pWindow->hide();
pWindow->_clear_fullscreen();
+ // avoid being called with W=H=0 in suboptimal scenario of #1299
+ if (!W) W = w();
+ if (!H) H = h();
pWindow->resize(X, Y, W, H);
pWindow->show();
Fl::handle(FL_FULLSCREEN, pWindow);
[ Direct Link to Message ]