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');