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 4fd3c63da9
commit 2ae7454f36
13 changed files with 625 additions and 260 deletions

View File

@@ -2177,6 +2177,7 @@ meta_display_handle_event (MetaDisplay *display,
gboolean bypass_compositor;
gboolean filter_out_event;
XIEvent *input_event;
MetaScreen *screen;
#ifdef WITH_VERBOSE_MODE
if (dump_events)
@@ -2204,6 +2205,13 @@ meta_display_handle_event (MetaDisplay *display,
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);