pointer/keyboard: Put the destroy listener on the right resource
We care about when the surface is destroyed, not when the wl_pointer slash wl_keyboard resource is destroyed.
This commit is contained in:
parent
515dc08a97
commit
b65649186d
@ -556,7 +556,7 @@ meta_wayland_keyboard_set_focus (MetaWaylandKeyboard *keyboard,
|
|||||||
wl_keyboard_send_enter (resource, serial, surface->resource,
|
wl_keyboard_send_enter (resource, serial, surface->resource,
|
||||||
&keyboard->keys);
|
&keyboard->keys);
|
||||||
}
|
}
|
||||||
wl_resource_add_destroy_listener (resource, &keyboard->focus_surface_listener);
|
wl_resource_add_destroy_listener (surface->resource, &keyboard->focus_surface_listener);
|
||||||
keyboard->focus_serial = serial;
|
keyboard->focus_serial = serial;
|
||||||
|
|
||||||
meta_wayland_surface_focused_set (surface);
|
meta_wayland_surface_focused_set (surface);
|
||||||
|
@ -364,7 +364,7 @@ meta_wayland_pointer_set_focus (MetaWaylandPointer *pointer,
|
|||||||
wl_fixed_to_int (pointer->x),
|
wl_fixed_to_int (pointer->x),
|
||||||
wl_fixed_to_int (pointer->y));
|
wl_fixed_to_int (pointer->y));
|
||||||
wl_pointer_send_enter (resource, serial, surface->resource, sx, sy);
|
wl_pointer_send_enter (resource, serial, surface->resource, sx, sy);
|
||||||
wl_resource_add_destroy_listener (resource, &pointer->focus_surface_listener);
|
wl_resource_add_destroy_listener (surface->resource, &pointer->focus_surface_listener);
|
||||||
pointer->focus_serial = serial;
|
pointer->focus_serial = serial;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user