mirror of
https://github.com/brl/mutter.git
synced 2024-12-25 04:22:05 +00:00
wayland: Add a wrapper for set_input_focus
So we're not poking into seat internals.
This commit is contained in:
parent
664f6ef420
commit
a977fcf3d0
@ -25,6 +25,7 @@
|
||||
|
||||
#include "meta-wayland-private.h"
|
||||
#include "meta-wayland-versions.h"
|
||||
#include "meta-wayland-data-device.h"
|
||||
|
||||
static void
|
||||
unbind_resource (struct wl_resource *resource)
|
||||
@ -193,6 +194,14 @@ meta_wayland_seat_repick (MetaWaylandSeat *seat)
|
||||
meta_wayland_pointer_repick (&seat->pointer);
|
||||
}
|
||||
|
||||
void
|
||||
meta_wayland_seat_set_input_focus (MetaWaylandSeat *seat,
|
||||
MetaWaylandSurface *surface)
|
||||
{
|
||||
meta_wayland_keyboard_set_focus (&seat->keyboard, surface);
|
||||
meta_wayland_data_device_set_keyboard_focus (seat);
|
||||
}
|
||||
|
||||
void
|
||||
meta_wayland_seat_update_cursor_surface (MetaWaylandSeat *seat)
|
||||
{
|
||||
|
@ -56,6 +56,9 @@ void meta_wayland_seat_update (MetaWaylandSeat *seat,
|
||||
gboolean meta_wayland_seat_handle_event (MetaWaylandSeat *seat,
|
||||
const ClutterEvent *event);
|
||||
|
||||
void meta_wayland_seat_set_input_focus (MetaWaylandSeat *seat,
|
||||
MetaWaylandSurface *surface);
|
||||
|
||||
void meta_wayland_seat_repick (MetaWaylandSeat *seat);
|
||||
void meta_wayland_seat_update_cursor_surface (MetaWaylandSeat *seat);
|
||||
|
||||
|
@ -187,9 +187,7 @@ meta_wayland_compositor_set_input_focus (MetaWaylandCompositor *compositor,
|
||||
{
|
||||
MetaWaylandSurface *surface = window ? window->surface : NULL;
|
||||
|
||||
meta_wayland_keyboard_set_focus (&compositor->seat->keyboard,
|
||||
surface);
|
||||
meta_wayland_data_device_set_keyboard_focus (compositor->seat);
|
||||
meta_wayland_seat_set_input_focus (compositor->seat, surface);
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user