[gnome-documents/gnome-3-16] preview: Ignore motion-notify-events coming from touchscreens
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents/gnome-3-16] preview: Ignore motion-notify-events coming from touchscreens
- Date: Wed, 25 Feb 2015 19:20:34 +0000 (UTC)
commit bc6a815b13e4002a0fafef0934c657fb4bdfa407
Author: Debarshi Ray <debarshir gnome org>
Date: Wed Feb 25 18:16:54 2015 +0100
preview: Ignore motion-notify-events coming from touchscreens
The EvView reacts to pan and zoom gestures. We should let the gestures
do their thing and not reveal the overlaid controls when a user is
moving her fingers across the touchscreen.
https://bugzilla.gnome.org/show_bug.cgi?id=741564
src/preview.js | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/preview.js b/src/preview.js
index 78b1d8b..af096f3 100644
--- a/src/preview.js
+++ b/src/preview.js
@@ -654,11 +654,16 @@ const PreviewNavControls = new Lang.Class({
return false;
},
- _onMotion: function() {
+ _onMotion: function(widget, event) {
if (this._motionId != 0) {
return false;
}
+ let device = event.get_source_device();
+ if (device.input_source == Gdk.InputSource.TOUCHSCREEN) {
+ return false;
+ }
+
this._motionId = Mainloop.idle_add(Lang.bind(this, this._motionTimeout));
return false;
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]