FLTK logo

[master] 647b0a8 - Wayland: fix window closing with titlelbar close button.

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] 647b0a8 - Wayland: fix window closing with titlelbar close button. "ManoloFLTK" Sep 22, 2022  
 
commit 647b0a800852a800a38239c086bbcdb60d4d112e
Author:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Thu Sep 22 10:51:46 2022 +0200
Commit:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Thu Sep 22 10:51:46 2022 +0200

    Wayland: fix window closing with titlelbar close button.

 src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
index 43c3d3f..b8afbc1 100644
--- src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
+++ src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
@@ -825,11 +825,14 @@ void Fl_Wayland_Window_Driver::wait_for_expose()
   }
 }
 
+static void delayed_close(Fl_Window *win) {
+  Fl::handle(FL_CLOSE, win);
+}
 
 static void handle_close(struct libdecor_frame *frame, void *user_data)
 {
   struct wld_window* wl_win = (struct wld_window*)user_data;
-  Fl::handle(FL_CLOSE, wl_win->fl_win);
+  Fl::add_timeout(0.01, (Fl_Timeout_Handler)delayed_close, wl_win->fl_win);
 }
 
 
Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.