diff --git a/js/ui/modalDialog.js b/js/ui/modalDialog.js index 18e1f34e7..df32fcca5 100644 --- a/js/ui/modalDialog.js +++ b/js/ui/modalDialog.js @@ -111,8 +111,8 @@ export const ModalDialog = GObject.registerClass({ this.notify('state'); } - vfunc_key_press_event() { - if (global.focus_manager.navigate_from_event(Clutter.get_current_event())) + vfunc_key_press_event(event) { + if (global.focus_manager.navigate_from_event(event)) return Clutter.EVENT_STOP; return Clutter.EVENT_PROPAGATE; diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js index f22e04c21..c15b74c3d 100644 --- a/js/ui/popupMenu.js +++ b/js/ui/popupMenu.js @@ -143,7 +143,7 @@ export const PopupBaseMenuItem = GObject.registerClass({ } vfunc_key_press_event(event) { - if (global.focus_manager.navigate_from_event(Clutter.get_current_event())) + if (global.focus_manager.navigate_from_event(event)) return Clutter.EVENT_STOP; if (!this._activatable) @@ -162,7 +162,7 @@ export const PopupBaseMenuItem = GObject.registerClass({ let symbol = event.get_key_symbol(); if (symbol == Clutter.KEY_space || symbol == Clutter.KEY_Return) { - this.activate(Clutter.get_current_event()); + this.activate(event); return Clutter.EVENT_STOP; } return Clutter.EVENT_PROPAGATE; diff --git a/js/ui/slider.js b/js/ui/slider.js index 7ca0e3fef..cde2ebce3 100644 --- a/js/ui/slider.js +++ b/js/ui/slider.js @@ -61,8 +61,8 @@ export const Slider = GObject.registerClass({ cr.$dispose(); } - vfunc_button_press_event() { - return this.startDragging(Clutter.get_current_event()); + vfunc_button_press_event(event) { + return this.startDragging(event); } startDragging(event) { @@ -117,8 +117,7 @@ export const Slider = GObject.registerClass({ return Clutter.EVENT_PROPAGATE; } - vfunc_touch_event() { - let event = Clutter.get_current_event(); + vfunc_touch_event(event) { let sequence = event.get_event_sequence(); if (!this._dragging && @@ -159,13 +158,13 @@ export const Slider = GObject.registerClass({ return Clutter.EVENT_STOP; } - vfunc_scroll_event() { - return this.scroll(Clutter.get_current_event()); + vfunc_scroll_event(event) { + return this.scroll(event); } - vfunc_motion_event() { + vfunc_motion_event(event) { if (this._dragging && !this._grabbedSequence) - return this._motionEvent(this, Clutter.get_current_event()); + return this._motionEvent(this, event); return Clutter.EVENT_PROPAGATE; }