compositor: Post keyboard leave before destroying surface
We may want to move this into wayland-server.
This commit is contained in:
@@ -598,11 +598,18 @@ weston_compositor_repick(struct weston_compositor *compositor)
|
|||||||
static void
|
static void
|
||||||
weston_surface_unmap(struct weston_surface *surface)
|
weston_surface_unmap(struct weston_surface *surface)
|
||||||
{
|
{
|
||||||
|
struct wl_input_device *device = surface->compositor->input_device;
|
||||||
|
|
||||||
weston_surface_damage_below(surface);
|
weston_surface_damage_below(surface);
|
||||||
surface->output = NULL;
|
surface->output = NULL;
|
||||||
wl_list_remove(&surface->link);
|
wl_list_remove(&surface->link);
|
||||||
wl_list_remove(&surface->layer_link);
|
wl_list_remove(&surface->layer_link);
|
||||||
weston_compositor_repick(surface->compositor);
|
weston_compositor_repick(surface->compositor);
|
||||||
|
|
||||||
|
if (device->keyboard_focus == &surface->surface)
|
||||||
|
wl_input_device_set_keyboard_focus(device, NULL,
|
||||||
|
weston_compositor_get_time());
|
||||||
|
|
||||||
weston_compositor_schedule_repaint(surface->compositor);
|
weston_compositor_schedule_repaint(surface->compositor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user