Add MetaCursorTracker, a new helper for tracking the cursor sprite

Under X, we need to use XFixes to watch the cursor changing, while
on wayland, we're in charge of setting and painting the cursor.
MetaCursorTracker provides the abstraction layer for gnome-shell,
which can thus drop ShellXFixesCursor. In the future, it may grow
the ability to watch for pointer position too, especially if
CursorEvents are added to the next version of XInput2, and thus
it would also replace the PointerWatcher we use for gnome-shell's
magnifier.

https://bugzilla.gnome.org/show_bug.cgi?id=705911
This commit is contained in:
Giovanni Campagna
2013-08-13 12:57:41 +02:00
parent 1dcd52838b
commit 7d1e149905
8 changed files with 395 additions and 15 deletions

View File

@@ -2147,6 +2147,7 @@ event_callback (XEvent *event,
gboolean filter_out_event;
XIEvent *input_event;
MetaMonitorManager *monitor;
MetaScreen *screen;
display = data;
@@ -2184,6 +2185,13 @@ event_callback (XEvent *event,
display->server_focus_serial);
}
screen = meta_display_screen_for_root (display, event->xany.window);
if (screen)
{
if (meta_screen_handle_xevent (screen, event))
return TRUE;
}
modified = event_get_modified_window (display, event);
input_event = get_input_event (display, event);