summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2012-06-15 15:07:59 -0400
committerKristian Høgsberg <krh@bitplanet.net>2012-06-15 15:07:59 -0400
commit6b9c6d956e61b4560a7f8b42c1e30f895da5c807 (patch)
tree05215e1d2c9a4371df178b8731e1ca8f4cf2711c
parentafd4a805813ed97e531224bb95152aa82c31037a (diff)
xwayland: Follow wl_pointer.set_cursor change
-rw-r--r--hw/xfree86/xwayland/xwayland-cursor.c10
-rw-r--r--hw/xfree86/xwayland/xwayland-input.c1
-rw-r--r--hw/xfree86/xwayland/xwayland-private.h1
-rw-r--r--hw/xfree86/xwayland/xwayland.c1
4 files changed, 10 insertions, 3 deletions
diff --git a/hw/xfree86/xwayland/xwayland-cursor.c b/hw/xfree86/xwayland/xwayland-cursor.c
index 2bbebcb7e..5a69aebf3 100644
--- a/hw/xfree86/xwayland/xwayland-cursor.c
+++ b/hw/xfree86/xwayland/xwayland-cursor.c
@@ -168,9 +168,13 @@ xwl_set_cursor(DeviceIntPtr device,
buffer = dixGetPrivate(&cursor->devPrivates, &xwl_cursor_private_key);
- wl_pointer_attach(xwl_seat->wl_pointer,
- xwl_seat->pointer_enter_serial, buffer,
- cursor->bits->xhot, cursor->bits->yhot);
+ wl_pointer_set_cursor(xwl_seat->wl_pointer,
+ xwl_seat->pointer_enter_serial,
+ xwl_seat->cursor,
+ cursor->bits->xhot, cursor->bits->yhot);
+ wl_surface_attach(xwl_seat->cursor, buffer, 0, 0);
+ wl_surface_damage(xwl_seat->cursor, 0, 0,
+ cursor->bits->width, cursor->bits->height);
}
static void
diff --git a/hw/xfree86/xwayland/xwayland-input.c b/hw/xfree86/xwayland/xwayland-input.c
index 517ad30ec..a4d8dfebc 100644
--- a/hw/xfree86/xwayland/xwayland-input.c
+++ b/hw/xfree86/xwayland/xwayland-input.c
@@ -486,6 +486,7 @@ create_input_device(struct xwl_screen *xwl_screen, uint32_t id,
wl_display_bind(xwl_screen->display, id, &wl_seat_interface);
xwl_seat->id = id;
+ xwl_seat->cursor = wl_compositor_create_surface(xwl_screen->compositor);
wl_seat_add_listener(xwl_seat->seat, &seat_listener, xwl_seat);
wl_array_init(&xwl_seat->keys);
}
diff --git a/hw/xfree86/xwayland/xwayland-private.h b/hw/xfree86/xwayland/xwayland-private.h
index 4dd56736e..aaa77b47e 100644
--- a/hw/xfree86/xwayland/xwayland-private.h
+++ b/hw/xfree86/xwayland/xwayland-private.h
@@ -95,6 +95,7 @@ struct xwl_seat {
struct wl_pointer *wl_pointer;
struct wl_keyboard *wl_keyboard;
struct wl_array keys;
+ struct wl_surface *cursor;
int grab;
struct xwl_window *focus_window;
int32_t grab_x, grab_y;
diff --git a/hw/xfree86/xwayland/xwayland.c b/hw/xfree86/xwayland/xwayland.c
index 0bf8f4ee6..40650e730 100644
--- a/hw/xfree86/xwayland/xwayland.c
+++ b/hw/xfree86/xwayland/xwayland.c
@@ -36,6 +36,7 @@
#include <xorg-server.h>
#include <extinit.h>
+
#include <xf86Xinput.h>
#include <xf86Crtc.h>
#include <xf86Priv.h>