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