[gnome-shell] windowPreview: Unset selected if window was clicked to switch workspaces
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] windowPreview: Unset selected if window was clicked to switch workspaces
- Date: Mon, 1 Mar 2021 14:51:15 +0000 (UTC)
commit a6588d054f4c4536174443736b37bb627b5e14e8
Author: Sebastian Keller <skeller gnome org>
Date: Wed Feb 24 23:22:52 2021 +0100
windowPreview: Unset selected if window was clicked to switch workspaces
This is used to detect whether a click was short enough to select a
window and activate it or long enough to start a drag. Usually when
clicking on a window and selecting it, this leaves the overview, but
when clicking on a window on a neighboring workspace, the overview is
kept open, but selected is not unset in this case. So all attempts at
dragging the window after using it to switch workspaces will fail.
Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3783
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1717>
js/ui/windowPreview.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/windowPreview.js b/js/ui/windowPreview.js
index a27d0586f4..bb97ebc635 100644
--- a/js/ui/windowPreview.js
+++ b/js/ui/windowPreview.js
@@ -819,8 +819,10 @@ var WindowPreview = GObject.registerClass({
// run - make sure to not start a drag in that case
this._longPressLater = Meta.later_add(Meta.LaterType.BEFORE_REDRAW, () => {
delete this._longPressLater;
- if (this._selected)
+ if (this._selected) {
+ this._selected = false;
return;
+ }
let [x, y] = action.get_coords();
action.release();
this._draggable.startDrag(x, y, global.get_current_time(), this._dragTouchSequence,
event.get_device());
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]