|
|
f6a177 |
From c12006de1af0edb5380b0870ffdfe41d4ff153f1 Mon Sep 17 00:00:00 2001
|
|
|
f6a177 |
From: Ray Strode <rstrode@redhat.com>
|
|
|
f6a177 |
Date: Wed, 6 Mar 2019 16:35:14 -0500
|
|
|
f6a177 |
Subject: [PATCH] window-list: drop button grab when leaving button
|
|
|
f6a177 |
|
|
|
f6a177 |
StButton doesn't always drop its grab, if the user releases the
|
|
|
f6a177 |
mouse over the wrong part of the screen.
|
|
|
f6a177 |
|
|
|
f6a177 |
This commit works around the problem by pretending the user
|
|
|
f6a177 |
lift their finger from the mouse as soon as they leave the
|
|
|
f6a177 |
boundaries of the button actor.
|
|
|
f6a177 |
---
|
|
|
f6a177 |
extensions/window-list/extension.js | 6 ++++++
|
|
|
f6a177 |
1 file changed, 6 insertions(+)
|
|
|
f6a177 |
|
|
|
f6a177 |
diff --git a/extensions/window-list/extension.js b/extensions/window-list/extension.js
|
|
|
f6a177 |
index 716a324..af71e91 100644
|
|
|
f6a177 |
--- a/extensions/window-list/extension.js
|
|
|
f6a177 |
+++ b/extensions/window-list/extension.js
|
|
|
f6a177 |
@@ -227,6 +227,7 @@ class BaseButton {
|
|
|
f6a177 |
this.actor.connect('allocation-changed',
|
|
|
f6a177 |
this._updateIconGeometry.bind(this));
|
|
|
f6a177 |
this.actor.connect('clicked', this._onClicked.bind(this));
|
|
|
f6a177 |
+ this.actor.connect('leave-event', this._onLeave.bind(this));
|
|
|
f6a177 |
this.actor.connect('destroy', this._onDestroy.bind(this));
|
|
|
f6a177 |
this.actor.connect('popup-menu', this._onPopupMenu.bind(this));
|
|
|
f6a177 |
|
|
|
f6a177 |
@@ -261,6 +262,11 @@ class BaseButton {
|
|
|
f6a177 |
throw new Error('Not implemented');
|
|
|
f6a177 |
}
|
|
|
f6a177 |
|
|
|
f6a177 |
+ _onLeave(actor, button) {
|
|
|
f6a177 |
+ this.actor.fake_release();
|
|
|
f6a177 |
+ return Clutter.EVENT_PROPAGATE;
|
|
|
f6a177 |
+ }
|
|
|
f6a177 |
+
|
|
|
f6a177 |
_canOpenPopupMenu() {
|
|
|
f6a177 |
return true;
|
|
|
f6a177 |
}
|
|
|
f6a177 |
--
|
|
|
f6a177 |
1.8.3.1
|
|
|
f6a177 |
|