From 361a115729d43edabeca691faccb99fe372f17f7 Mon Sep 17 00:00:00 2001 From: Adel Gadllah Date: Mon, 24 Jan 2011 22:56:23 +0100 Subject: [PATCH 1/5] recorder: Call cairo_surface_mark_dirty on the cursor surface Cairo surfaces have to be marked dirty after directly accessing them. This fixes the problem of the cursor not being in the recordings. --- src/shell-recorder.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/shell-recorder.c b/src/shell-recorder.c index a1c626b41..6f3a6ea37 100644 --- a/src/shell-recorder.c +++ b/src/shell-recorder.c @@ -412,6 +412,8 @@ recorder_fetch_cursor_image (ShellRecorder *recorder) for (i = 0; i < cursor_image->height; i++) for (j = 0; j < cursor_image->width; j++) *(guint32 *)(data + i * stride + 4 * j) = cursor_image->pixels[i * cursor_image->width + j]; + + cairo_surface_mark_dirty (recorder->cursor_image); } /* Overlay the cursor image on the frame. We draw the cursor image From f721e8068599ce4fe28bd40f76a866704291c1d3 Mon Sep 17 00:00:00 2001 From: Andrea Veri Date: Tue, 25 Jan 2011 00:06:58 +0100 Subject: [PATCH 2/5] Modifying Colin Walters UID. (cwalters to walters) into gnome-shell.doap. This was causing some 'no route to host' mail sent to RT. AndreaVeri on behalf of the AccountsTeam --- gnome-shell.doap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnome-shell.doap b/gnome-shell.doap index f16448cf7..9b2b5bf50 100644 --- a/gnome-shell.doap +++ b/gnome-shell.doap @@ -33,7 +33,7 @@ Colin Walters - cwalters + walters From b9e1d917dacea99186788ac24077add7c4363ade Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Mon, 24 Jan 2011 22:31:10 +0100 Subject: [PATCH 3/5] swipe-scroll: Don't eat button-release events on click The main overview group starts capturing events on button-press events to implement swipe-scrolling. While reactive children of the group which handle both button-press and button-release events don't trigger swipe-scrolling, children that only rely on button-release have stopped working - at least the primary/secondary icons of the search entry are affected. While the capture handler already checks the pointer movement between press and release to determine whether the action should be considered a click rather than a drag, it still blocks the release event from propagating. Instead, only block release events for drag actions, but not for clicks. https://bugzilla.gnome.org/show_bug.cgi?id=640493 --- js/ui/overview.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/js/ui/overview.js b/js/ui/overview.js index 8f4e830fa..c4b0c4ec0 100644 --- a/js/ui/overview.js +++ b/js/ui/overview.js @@ -324,16 +324,17 @@ Overview.prototype = { newValue += difference; } + let result; + // See if the user has moved the mouse enough to trigger // a drag let threshold = Gtk.Settings.get_default().gtk_dnd_drag_threshold; if (Math.abs(stageX - this._dragStartX) < threshold && Math.abs(stageY - this._dragStartY) < threshold) { // no motion? It's a click! - this.emit('swipe-scroll-end', SwipeScrollResult.CLICK); + result = SwipeScrollResult.CLICK; + this.emit('swipe-scroll-end', result); } else { - let result; - if (newValue == this._dragStartValue) result = SwipeScrollResult.CANCEL; else @@ -362,7 +363,7 @@ Overview.prototype = { global.stage.disconnect(this._capturedEventId); this._capturedEventId = 0; - return true; + return result != SwipeScrollResult.CLICK; case Clutter.EventType.MOTION: [stageX, stageY] = event.get_coords(); From eb8fc738afe04f842c9a9f23e79fb81034932fab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Mon, 24 Jan 2011 23:15:33 +0100 Subject: [PATCH 4/5] swipe-scrolling: Take threshold into account during drag On button-release, a threshold is used to determine if the gesture should be considered a click and thus ignored. While the drag is active though, the controlled actor is dragged immediately. As a result, dragging by a tiny amount does not trigger a snap back when the action is interpreted as a click. As a fix, do not update the dragged actor's position until the same threshold is passed. https://bugzilla.gnome.org/show_bug.cgi?id=640494 --- js/ui/overview.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/js/ui/overview.js b/js/ui/overview.js index c4b0c4ec0..513d93baf 100644 --- a/js/ui/overview.js +++ b/js/ui/overview.js @@ -276,6 +276,8 @@ Overview.prototype = { _onCapturedEvent: function(actor, event) { let stageX, stageY; + let threshold = Gtk.Settings.get_default().gtk_dnd_drag_threshold; + switch(event.type()) { case Clutter.EventType.BUTTON_RELEASE: [stageX, stageY] = event.get_coords(); @@ -328,7 +330,6 @@ Overview.prototype = { // See if the user has moved the mouse enough to trigger // a drag - let threshold = Gtk.Settings.get_default().gtk_dnd_drag_threshold; if (Math.abs(stageX - this._dragStartX) < threshold && Math.abs(stageY - this._dragStartY) < threshold) { // no motion? It's a click! @@ -371,6 +372,16 @@ Overview.prototype = { let dy = this._dragY - stageY; let primary = global.get_primary_monitor(); + this._dragX = stageX; + this._dragY = stageY; + this._lastMotionTime = event.get_time(); + + // See if the user has moved the mouse enough to trigger + // a drag + if (Math.abs(stageX - this._dragStartX) < threshold && + Math.abs(stageY - this._dragStartY) < threshold) + return true; + if (this._scrollDirection == SwipeScrollDirection.HORIZONTAL) { if (St.Widget.get_default_direction() == St.TextDirection.RTL) this._scrollAdjustment.value -= (dx / primary.width) * this._scrollAdjustment.page_size; @@ -380,10 +391,6 @@ Overview.prototype = { this._scrollAdjustment.value += (dy / primary.height) * this._scrollAdjustment.page_size; } - this._dragX = stageX; - this._dragY = stageY; - this._lastMotionTime = event.get_time(); - return true; // Block enter/leave events to avoid prelights From d2a40d6885a4a331e6b810c8632a25b510796dab Mon Sep 17 00:00:00 2001 From: Adel Gadllah Date: Tue, 25 Jan 2011 15:30:19 +0100 Subject: [PATCH 5/5] appSwitcher: Make sure we don't leave a stale timeout handler --- js/ui/altTab.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/ui/altTab.js b/js/ui/altTab.js index a8d3e79ea..85846cb66 100644 --- a/js/ui/altTab.js +++ b/js/ui/altTab.js @@ -946,6 +946,8 @@ AppSwitcher.prototype = { this._mouseTimeOutId = Mainloop.timeout_add(APP_ICON_HOVER_TIMEOUT, Lang.bind(this, function () { this._enterItem(index); + this._mouseTimeOutId = 0; + return false; })); } else this._itemEntered(index);