[mutter] display: Pull the grab cursor from the cursor tracker
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] display: Pull the grab cursor from the cursor tracker
- Date: Wed, 23 Apr 2014 16:16:05 +0000 (UTC)
commit f42184ded81c86171a15eeb6cea1be03d83ff47d
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Wed Apr 23 11:12:04 2014 -0400
display: Pull the grab cursor from the cursor tracker
This might look silly, but just wait...
src/backends/meta-cursor-tracker-private.h | 2 ++
src/backends/meta-cursor-tracker.c | 6 ++++++
src/core/display.c | 4 +++-
3 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/src/backends/meta-cursor-tracker-private.h b/src/backends/meta-cursor-tracker-private.h
index dd6c364..2f20adf 100644
--- a/src/backends/meta-cursor-tracker-private.h
+++ b/src/backends/meta-cursor-tracker-private.h
@@ -83,4 +83,6 @@ void meta_cursor_tracker_update_position (MetaCursorTracker *tracker,
int new_x,
int new_y);
+MetaCursorReference * meta_cursor_tracker_get_displayed_cursor (MetaCursorTracker *tracker);
+
#endif
diff --git a/src/backends/meta-cursor-tracker.c b/src/backends/meta-cursor-tracker.c
index 128ae1c..2511724 100644
--- a/src/backends/meta-cursor-tracker.c
+++ b/src/backends/meta-cursor-tracker.c
@@ -480,3 +480,9 @@ meta_cursor_tracker_set_pointer_visible (MetaCursorTracker *tracker,
tracker->screen->xroot);
}
}
+
+MetaCursorReference *
+meta_cursor_tracker_get_displayed_cursor (MetaCursorTracker *tracker)
+{
+ return tracker->displayed_cursor;
+}
diff --git a/src/core/display.c b/src/core/display.c
index 53f33f8..c982f8f 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -1749,7 +1749,9 @@ meta_display_set_grab_op_cursor (MetaDisplay *display,
XISetMask (mask.mask, XI_Leave);
XISetMask (mask.mask, XI_Motion);
- MetaCursor cursor = meta_cursor_for_grab_op (op);
+ MetaCursorTracker *tracker = meta_cursor_tracker_get_for_screen (display->screen);
+ MetaCursorReference *cursor_ref = meta_cursor_tracker_get_displayed_cursor (tracker);
+ MetaCursor cursor = meta_cursor_reference_get_meta_cursor (cursor_ref);
meta_error_trap_push (display);
if (XIGrabDevice (display->xdisplay,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]