panel: Don't chain up to non-existent parent vfunc

Just as with c35b4cede5, 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
This commit is contained in:
Jonas Dreßler 2019-11-04 11:18:25 +01:00
parent 88bcaafe86
commit c1ae634174

View File

@ -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())
if (Main.overview.shouldToggleByCornerOrButton()) {
Main.overview.toggle();
return Clutter.EVENT_STOP;
}
}
return ret;
return Clutter.EVENT_PROPAGATE;
}
_xdndToggleOverview() {