[gnome-shell] panel: Don't chain up to non-existent parent vfunc
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] panel: Don't chain up to non-existent parent vfunc
- Date: Fri, 15 Nov 2019 22:25:15 +0000 (UTC)
commit c1ae634174db37d00a0715fde69aa92dad3b9ff0
Author: Jonas Dreßler <verdre v0yd nl>
Date: Mon Nov 4 11:18:25 2019 +0100
panel: Don't chain up to non-existent parent vfunc
Just as with c35b4cede58142797b1f6b04a4e2e7eaa938234a, there's no
default vfunc implemented by any parent which causes gjs to crash when
trying to call it.
So return EVENT_STOP if the key press successfully toggled the button,
and EVENT_PROPAGATE otherwise.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/830
js/ui/panel.js | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/js/ui/panel.js b/js/ui/panel.js
index 69882894cd..e8e45b0abb 100644
--- a/js/ui/panel.js
+++ b/js/ui/panel.js
@@ -480,15 +480,15 @@ class ActivitiesButton extends PanelMenu.Button {
}
vfunc_key_release_event(keyEvent) {
- let ret = super.vfunc_key_release_event(keyEvent);
- if (ret == Clutter.EVENT_PROPAGATE) {
- let symbol = keyEvent.keyval;
- if (symbol == Clutter.KEY_Return || symbol == Clutter.KEY_space) {
- if (Main.overview.shouldToggleByCornerOrButton())
- Main.overview.toggle();
+ let symbol = keyEvent.keyval;
+ if (symbol == Clutter.KEY_Return || symbol == Clutter.KEY_space) {
+ if (Main.overview.shouldToggleByCornerOrButton()) {
+ Main.overview.toggle();
+ return Clutter.EVENT_STOP;
}
}
- return ret;
+
+ return Clutter.EVENT_PROPAGATE;
}
_xdndToggleOverview() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]