mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
xwayland: clear wlr_xwayland_surface in handle_destroy
Avoids wlr_xwayland_surface becoming a dangling pointer if a view is not destroyed immediately. See swaywm/sway@215787e8
This commit is contained in:
parent
fb6792f12c
commit
26454e3115
1 changed files with 2 additions and 1 deletions
|
|
@ -81,6 +81,7 @@ handle_destroy(struct wl_listener *listener, void *data)
|
||||||
if (view->toplevel_handle) {
|
if (view->toplevel_handle) {
|
||||||
wlr_foreign_toplevel_handle_v1_destroy(view->toplevel_handle);
|
wlr_foreign_toplevel_handle_v1_destroy(view->toplevel_handle);
|
||||||
}
|
}
|
||||||
|
view->xwayland_surface = NULL;
|
||||||
wl_list_remove(&view->link);
|
wl_list_remove(&view->link);
|
||||||
wl_list_remove(&view->map.link);
|
wl_list_remove(&view->map.link);
|
||||||
wl_list_remove(&view->unmap.link);
|
wl_list_remove(&view->unmap.link);
|
||||||
|
|
@ -97,7 +98,7 @@ handle_request_configure(struct wl_listener *listener, void *data)
|
||||||
{
|
{
|
||||||
struct view *view = wl_container_of(listener, view, request_configure);
|
struct view *view = wl_container_of(listener, view, request_configure);
|
||||||
struct wlr_xwayland_surface_configure_event *event = data;
|
struct wlr_xwayland_surface_configure_event *event = data;
|
||||||
|
|
||||||
int min_width, min_height;
|
int min_width, min_height;
|
||||||
view_min_size(view, &min_width, &min_height);
|
view_min_size(view, &min_width, &min_height);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue