[mutter/wip/tablet-protocol: 42/50] wayland: Add wl_tablet cursor rendering and management functions
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/tablet-protocol: 42/50] wayland: Add wl_tablet cursor rendering and management functions
- Date: Tue, 23 Jun 2015 14:21:24 +0000 (UTC)
commit a9dbc7f73531a2f858b963010b737a39106a72a1
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Feb 4 20:03:46 2015 +0100
wayland: Add wl_tablet cursor rendering and management functions
src/wayland/meta-wayland-tablet.c | 12 ++++++++++++
src/wayland/meta-wayland-tablet.h | 5 +++++
2 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/src/wayland/meta-wayland-tablet.c b/src/wayland/meta-wayland-tablet.c
index 7a0f317..3d8eea4 100644
--- a/src/wayland/meta-wayland-tablet.c
+++ b/src/wayland/meta-wayland-tablet.c
@@ -51,6 +51,9 @@ meta_wayland_tablet_new (ClutterInputDevice *device,
tablet->device = device;
tablet->manager = manager;
+ tablet->cursor_renderer = meta_cursor_renderer_new ();
+ meta_cursor_renderer_set_cursor (tablet->cursor_renderer, NULL);
+
return tablet;
}
@@ -65,6 +68,7 @@ meta_wayland_tablet_free (MetaWaylandTablet *tablet)
wl_resource_destroy (resource);
}
+ g_object_unref (tablet->cursor_renderer);
g_slice_free (MetaWaylandTablet, tablet);
}
@@ -145,6 +149,14 @@ meta_wayland_tablet_create_new_resource (MetaWaylandTablet *tablet,
return resource;
}
+void
+meta_wayland_tablet_update_cursor_position (MetaWaylandTablet *tablet,
+ int new_x,
+ int new_y)
+{
+ meta_cursor_renderer_set_position (tablet->cursor_renderer, new_x, new_y);
+}
+
struct wl_resource *
meta_wayland_tablet_lookup_resource (MetaWaylandTablet *tablet,
struct wl_client *client)
diff --git a/src/wayland/meta-wayland-tablet.h b/src/wayland/meta-wayland-tablet.h
index 3eba8bd..34bc399 100644
--- a/src/wayland/meta-wayland-tablet.h
+++ b/src/wayland/meta-wayland-tablet.h
@@ -36,6 +36,8 @@ struct _MetaWaylandTablet
struct wl_list resource_list;
+ MetaCursorRenderer *cursor_renderer;
+
MetaWaylandSurface *current;
};
@@ -57,5 +59,8 @@ struct wl_resource *
meta_wayland_tablet_lookup_resource (MetaWaylandTablet *tablet,
struct wl_client *client);
+void meta_wayland_tablet_update_cursor_position (MetaWaylandTablet *tablet,
+ int new_x,
+ int new_y);
#endif /* META_WAYLAND_TABLET_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]