mirror of
https://codeberg.org/dwl/dwl.git
synced 2025-12-16 18:03:19 +00:00
Free pointer focus for seat at end of destroylayersurfacenotify
This commit is contained in:
parent
2623a96ebf
commit
f46e656da9
5
dwl.c
5
dwl.c
@ -1040,6 +1040,11 @@ destroylayersurfacenotify(struct wl_listener *listener, void *data)
|
||||
{
|
||||
LayerSurface *layersurface = wl_container_of(listener, layersurface, destroy);
|
||||
|
||||
/* Check if focused_surface saved in the seat pointer_state is the same wlr_surface
|
||||
* corresponding to this one being destroyed. Clear pointer focus if it is. */
|
||||
if (seat->pointer_state.focused_surface == layersurface->layer_surface->surface)
|
||||
wlr_seat_pointer_notify_clear_focus(seat);
|
||||
|
||||
if (layersurface->layer_surface->mapped)
|
||||
unmaplayersurface(layersurface);
|
||||
wl_list_remove(&layersurface->link);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user