|
|
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 ] | |
|
| |