[gnome-shell] workspaceThumbnail: Enable activation of window clones on touch
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] workspaceThumbnail: Enable activation of window clones on touch
- Date: Fri, 4 Dec 2015 11:18:12 +0000 (UTC)
commit 06f78549bd2d67926af055fa0d2c7bb773845d64
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Oct 16 18:12:45 2015 +0200
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 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/workspaceThumbnail.js b/js/ui/workspaceThumbnail.js
index df8bc55..3b650ba 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');
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]