diff options
author | Jonas Ådahl <jadahl@gmail.com> | 2015-07-10 17:01:22 +0800 |
---|---|---|
committer | Jonas Ådahl <jadahl@gmail.com> | 2016-02-16 19:02:48 +0800 |
commit | 961166115461e84a6ec31782535585369ff528cb (patch) | |
tree | a5813a2566f0887799830f0d4d2bc77f9f55f3d1 /src/backends | |
parent | a70a2c37449c935eb0ad05482b056be6a4f69303 (diff) | |
download | mutter-961166115461e84a6ec31782535585369ff528cb.tar.gz |
native: Don't wait for a new input event to wrap the pointer
If we rely on getting back an input event with the warped pointer
coordinates, we might draw a frame with the old coordinates if we warp
during the paint phase. Avoid that by moving the cursor immediately.
https://bugzilla.gnome.org/show_bug.cgi?id=744104
Diffstat (limited to 'src/backends')
-rw-r--r-- | src/backends/native/meta-backend-native.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/backends/native/meta-backend-native.c b/src/backends/native/meta-backend-native.c index 768b96b8a..454eec655 100644 --- a/src/backends/native/meta-backend-native.c +++ b/src/backends/native/meta-backend-native.c @@ -36,6 +36,7 @@ #include "meta-monitor-manager-kms.h" #include "meta-cursor-renderer-native.h" #include "meta-launcher.h" +#include "backends/meta-cursor-tracker-private.h" #include "backends/meta-pointer-constraint.h" #include <stdlib.h> @@ -279,11 +280,16 @@ meta_backend_native_warp_pointer (MetaBackend *backend, { ClutterDeviceManager *manager = clutter_device_manager_get_default (); ClutterInputDevice *device = clutter_device_manager_get_core_device (manager, CLUTTER_POINTER_DEVICE); + MetaCursorTracker *tracker = meta_cursor_tracker_get_for_screen (NULL); /* XXX */ guint32 time_ = 0; + /* Warp the input device pointer state. */ clutter_evdev_warp_pointer (device, time_, x, y); + + /* Warp displayed pointer cursor. */ + meta_cursor_tracker_update_position (tracker, x, y); } static void |