mirror of
https://github.com/brl/mutter.git
synced 2025-08-06 16:44:40 +00:00
pointer/keyboard: Surfaces should always have resources
There's no possible way that they shouldn't.
This commit is contained in:
@@ -439,13 +439,10 @@ meta_wayland_keyboard_set_focus (MetaWaylandKeyboard *keyboard,
|
||||
{
|
||||
if (keyboard->focus_resource)
|
||||
{
|
||||
if (keyboard->focus_surface->resource)
|
||||
{
|
||||
struct wl_client *client = wl_resource_get_client (keyboard->focus_resource);
|
||||
struct wl_display *display = wl_client_get_display (client);
|
||||
uint32_t serial = wl_display_next_serial (display);
|
||||
wl_keyboard_send_leave (keyboard->focus_resource, serial, keyboard->focus_surface->resource);
|
||||
}
|
||||
struct wl_client *client = wl_resource_get_client (keyboard->focus_resource);
|
||||
struct wl_display *display = wl_client_get_display (client);
|
||||
uint32_t serial = wl_display_next_serial (display);
|
||||
wl_keyboard_send_leave (keyboard->focus_resource, serial, keyboard->focus_surface->resource);
|
||||
|
||||
wl_list_remove (&keyboard->focus_resource_listener.link);
|
||||
keyboard->focus_resource = NULL;
|
||||
|
Reference in New Issue
Block a user