wayland: Send xdg_surface_focused_set / xdg_surface_focused_unset
This commit is contained in:
parent
7186841db0
commit
72a900787f
@ -498,6 +498,8 @@ meta_wayland_keyboard_set_focus (MetaWaylandKeyboard *keyboard,
|
||||
serial = wl_display_next_serial (display);
|
||||
wl_keyboard_send_leave (resource, serial, keyboard->focus->resource);
|
||||
wl_list_remove (&keyboard->focus_listener.link);
|
||||
|
||||
meta_wayland_surface_focused_unset (keyboard->focus);
|
||||
}
|
||||
|
||||
resource = find_resource_for_surface (&keyboard->resource_list, surface);
|
||||
@ -534,6 +536,8 @@ meta_wayland_keyboard_set_focus (MetaWaylandKeyboard *keyboard,
|
||||
}
|
||||
wl_resource_add_destroy_listener (resource, &keyboard->focus_listener);
|
||||
keyboard->focus_serial = serial;
|
||||
|
||||
meta_wayland_surface_focused_set (keyboard->focus);
|
||||
}
|
||||
|
||||
keyboard->focus_resource = resource;
|
||||
|
@ -1016,3 +1016,16 @@ meta_wayland_surface_configure_notify (MetaWaylandSurface *surface,
|
||||
0, 0 /* XXX: support this */);
|
||||
}
|
||||
|
||||
void
|
||||
meta_wayland_surface_focused_set (MetaWaylandSurface *surface)
|
||||
{
|
||||
if (surface->xdg_surface)
|
||||
xdg_surface_send_focused_set (surface->xdg_surface->resource);
|
||||
}
|
||||
|
||||
void
|
||||
meta_wayland_surface_focused_unset (MetaWaylandSurface *surface)
|
||||
{
|
||||
if (surface->xdg_surface)
|
||||
xdg_surface_send_focused_unset (surface->xdg_surface->resource);
|
||||
}
|
||||
|
@ -111,4 +111,7 @@ void meta_wayland_surface_configure_notify (MetaWaylandSurface *s
|
||||
int height,
|
||||
int edges);
|
||||
|
||||
void meta_wayland_surface_focused_set (MetaWaylandSurface *surface);
|
||||
void meta_wayland_surface_focused_unset (MetaWaylandSurface *surface);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user