summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2025-08-25 16:23:54 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2025-08-25 16:24:17 +0200
commitfa1d09b1068456b5245070b25b4de48cb3ab1615 (patch)
tree5bb2226e841cc62d7303f2d5d57bb6321a777328 /src/drivers
parent53f103f2cad038ac7262b5ceecd3a0b837851b6d (diff)
Fix "Wayland libdecor crashes with built-in one." (#1299)
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
index 5cba87436..dd7761df9 100644
--- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
+++ b/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);