diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2024-02-08 15:18:18 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2024-02-08 15:18:18 +0100 |
| commit | 1fdb1f79445ea6edc87900060443aaa8a2dcbc4d (patch) | |
| tree | d51951cd0fe2fcb2791d9a6730f0e009f614b75e /src | |
| parent | a1d3bf182e6c085779b6e7e7315bf15f384f7112 (diff) | |
Improve Fl_Wayland_Window_Driver::hide()
Diffstat (limited to 'src')
| -rw-r--r-- | src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx index 35c76e017..055802192 100644 --- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx @@ -453,13 +453,15 @@ void Fl_Wayland_Window_Driver::hide() { Fl_Screen_Driver::del_transient_window(NULL); } Fl_X* ip = Fl_X::flx(pWindow); + if (!ip) return; + struct wld_window *wld_win = (struct wld_window*)ip->xid; + if (wld_win->custom_cursor) delete_cursor_(); if (hide_common()) return; if (ip->region) { Fl_Graphics_Driver::default_driver().XDestroyRegion(ip->region); ip->region = 0; } screen_num_ = -1; - struct wld_window *wld_win = (struct wld_window*)ip->xid; if (wld_win) { // this test makes sure ip->xid has not been destroyed already Fl_Wayland_Graphics_Driver::buffer_release(wld_win); if (wld_win->kind == SUBWINDOW && wld_win->subsurface) { @@ -489,7 +491,6 @@ void Fl_Wayland_Window_Driver::hide() { destroy_surface_caution_pointer_focus(wld_win->wl_surface, scr_driver->seat); wld_win->wl_surface = NULL; } - if (wld_win->custom_cursor) delete_cursor_(); while (!wl_list_empty(&wld_win->outputs)) { // remove from screens where it belongs struct surface_output *s_output; s_output = wl_container_of(wld_win->outputs.next, s_output, link); |
