Remove output instead of terminating display when a wayland backend view closed

This commit is contained in:
emersion 2017-12-13 21:48:59 +01:00
parent 96f09c7492
commit 257559d890
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
3 changed files with 9 additions and 3 deletions

View file

@ -21,7 +21,10 @@ static void pointer_handle_enter(void *data, struct wl_pointer *wl_pointer,
struct wlr_wl_pointer *wlr_wl_pointer = (struct wlr_wl_pointer *)dev->pointer;
struct wlr_wl_backend_output *output =
wlr_wl_output_for_surface(wlr_wl_dev->backend, surface);
assert(output);
if (!output) {
// GNOME sends a pointer enter when the surface is being destroyed
return;
}
wlr_wl_pointer->current_output = output;
output->enter_serial = serial;
wlr_wl_output_update_cursor(output);