[gnome-shell/wip/rstrode/mouse-freeze-fix] popupMenu: block input events when menu is closing
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/rstrode/mouse-freeze-fix] popupMenu: block input events when menu is closing
- Date: Mon, 10 Dec 2018 20:30:31 +0000 (UTC)
commit a80e16d09e25114d6b56e003c418fd8321fd3958
Author: Ray Strode <rstrode redhat com>
Date: Mon Dec 10 15:25:35 2018 -0500
popupMenu: block input events when menu is closing
At the moment gnome-shell can get really confused if a menu is
fading out and gets clicked.
It can lead to mouse pointer input getting stuck until the shell
is restarted.
This commit addresses the problem by ignoring input events that
come in when the menu is closing.
js/ui/popupMenu.js | 9 +++++++++
1 file changed, 9 insertions(+)
---
diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js
index b0a919d1b..992084df7 100644
--- a/js/ui/popupMenu.js
+++ b/js/ui/popupMenu.js
@@ -123,12 +123,18 @@ var PopupBaseMenuItem = new Lang.Class({
},
_onButtonReleaseEvent(actor, event) {
+ if (this._parent && !this._parent.isOpen)
+ return Clutter.EVENT_STOP;
+
this.actor.remove_style_pseudo_class ('active');
this.activate(event);
return Clutter.EVENT_STOP;
},
_onTouchEvent(actor, event) {
+ if (this._parent && !this._parent.isOpen)
+ return Clutter.EVENT_STOP;
+
if (event.type() == Clutter.EventType.TOUCH_END) {
this.actor.remove_style_pseudo_class ('active');
this.activate(event);
@@ -141,6 +147,9 @@ var PopupBaseMenuItem = new Lang.Class({
},
_onKeyPressEvent(actor, event) {
+ if (this._parent && !this._parent.isOpen)
+ return Clutter.EVENT_STOP;
+
let state = event.get_state();
// if user has a modifier down (except capslock and numlock)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]