diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-09-22 10:51:46 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-09-22 10:51:46 +0200 |
| commit | 647b0a800852a800a38239c086bbcdb60d4d112e (patch) | |
| tree | 1360b14d70382aea4a0c14411948e74127947efc /src/drivers/Wayland | |
| parent | 6b63516890a77ce61a9670510a730811c02a3b09 (diff) | |
Wayland: fix window closing with titlelbar close button.
Diffstat (limited to 'src/drivers/Wayland')
| -rw-r--r-- | src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx index 43c3d3f1b..b8afbc1e1 100644 --- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx +++ b/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); } |
