[mutter] wayland: Add a wrapper for set_input_focus
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] wayland: Add a wrapper for set_input_focus
- Date: Thu, 10 Jul 2014 17:38:52 +0000 (UTC)
commit a977fcf3d0d2be2caabb3a9298defacaa0871cef
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Thu Jul 10 10:13:54 2014 -0400
wayland: Add a wrapper for set_input_focus
So we're not poking into seat internals.
src/wayland/meta-wayland-seat.c | 9 +++++++++
src/wayland/meta-wayland-seat.h | 3 +++
src/wayland/meta-wayland.c | 4 +---
3 files changed, 13 insertions(+), 3 deletions(-)
---
diff --git a/src/wayland/meta-wayland-seat.c b/src/wayland/meta-wayland-seat.c
index 82ceeb5..9b60fb7 100644
--- a/src/wayland/meta-wayland-seat.c
+++ b/src/wayland/meta-wayland-seat.c
@@ -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)
@@ -194,6 +195,14 @@ meta_wayland_seat_repick (MetaWaylandSeat *seat)
}
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)
{
meta_wayland_pointer_update_cursor_surface (&seat->pointer);
diff --git a/src/wayland/meta-wayland-seat.h b/src/wayland/meta-wayland-seat.h
index 68bad58..dd8caeb 100644
--- a/src/wayland/meta-wayland-seat.h
+++ b/src/wayland/meta-wayland-seat.h
@@ -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);
diff --git a/src/wayland/meta-wayland.c b/src/wayland/meta-wayland.c
index ff9709a..705c8c1 100644
--- a/src/wayland/meta-wayland.c
+++ b/src/wayland/meta-wayland.c
@@ -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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]