From 06f78549bd2d67926af055fa0d2c7bb773845d64 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Fri, 16 Oct 2015 18:12:45 +0200 Subject: [PATCH] workspaceThumbnail: Enable activation of window clones on touch We must handle the TOUCH_END event separately for the evdev input backend. https://bugzilla.gnome.org/show_bug.cgi?id=756748 --- js/ui/workspaceThumbnail.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/js/ui/workspaceThumbnail.js b/js/ui/workspaceThumbnail.js index df8bc5563..3b650ba29 100644 --- a/js/ui/workspaceThumbnail.js +++ b/js/ui/workspaceThumbnail.js @@ -80,6 +80,8 @@ const WindowClone = new Lang.Class({ this.actor.connect('button-release-event', Lang.bind(this, this._onButtonRelease)); + this.actor.connect('touch-event', + Lang.bind(this, this._onTouchEvent)); this.actor.connect('destroy', Lang.bind(this, this._onDestroy)); @@ -200,6 +202,15 @@ const WindowClone = new Lang.Class({ return Clutter.EVENT_STOP; }, + _onTouchEvent : function (actor, event) { + if (event.type() != Clutter.EventType.TOUCH_END || + !global.display.is_pointer_emulating_sequence(event.get_event_sequence())) + return Clutter.EVENT_PROPAGATE; + + this.emit('selected', event.get_time()); + return Clutter.EVENT_STOP; + }, + _onDragBegin : function (draggable, time) { this.inDrag = true; this.emit('drag-begin');