mirror of
https://github.com/brl/mutter.git
synced 2024-11-29 19:40:43 -05:00
pointer/keyboard: Surfaces should always have resources
There's no possible way that they shouldn't.
This commit is contained in:
parent
339b856d84
commit
bbec66c2d8
@ -439,13 +439,10 @@ meta_wayland_keyboard_set_focus (MetaWaylandKeyboard *keyboard,
|
|||||||
{
|
{
|
||||||
if (keyboard->focus_resource)
|
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);
|
||||||
struct wl_client *client = wl_resource_get_client (keyboard->focus_resource);
|
uint32_t serial = wl_display_next_serial (display);
|
||||||
struct wl_display *display = wl_client_get_display (client);
|
wl_keyboard_send_leave (keyboard->focus_resource, serial, keyboard->focus_surface->resource);
|
||||||
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);
|
wl_list_remove (&keyboard->focus_resource_listener.link);
|
||||||
keyboard->focus_resource = NULL;
|
keyboard->focus_resource = NULL;
|
||||||
|
@ -327,13 +327,10 @@ meta_wayland_pointer_set_focus (MetaWaylandPointer *pointer,
|
|||||||
{
|
{
|
||||||
if (pointer->focus_resource)
|
if (pointer->focus_resource)
|
||||||
{
|
{
|
||||||
if (pointer->focus_surface->resource)
|
struct wl_client *client = wl_resource_get_client (pointer->focus_resource);
|
||||||
{
|
struct wl_display *display = wl_client_get_display (client);
|
||||||
struct wl_client *client = wl_resource_get_client (pointer->focus_resource);
|
uint32_t serial = wl_display_next_serial (display);
|
||||||
struct wl_display *display = wl_client_get_display (client);
|
wl_pointer_send_leave (pointer->focus_resource, serial, pointer->focus_surface->resource);
|
||||||
uint32_t serial = wl_display_next_serial (display);
|
|
||||||
wl_pointer_send_leave (pointer->focus_resource, serial, pointer->focus_surface->resource);
|
|
||||||
}
|
|
||||||
|
|
||||||
wl_list_remove (&pointer->focus_resource_listener.link);
|
wl_list_remove (&pointer->focus_resource_listener.link);
|
||||||
pointer->focus_resource = NULL;
|
pointer->focus_resource = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user