window-list: Use getter methods for events

The underlying structs were made opaque a while ago, so direct
access to the struct fields is no longer possible.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/320>
This commit is contained in:
Florian Müllner
2024-04-26 15:22:16 +02:00
parent 02ff72b2f0
commit da90d365ec
+9 -9
View File
@@ -266,24 +266,24 @@ class BaseButton extends St.Button {
delete this._longPressTimeoutId;
}
vfunc_button_press_event(buttonEvent) {
if (buttonEvent.button === 1)
vfunc_button_press_event(event) {
if (event.get_button() === 1)
this._setLongPressTimeout();
return super.vfunc_button_press_event(buttonEvent);
return super.vfunc_button_press_event(event);
}
vfunc_button_release_event(buttonEvent) {
vfunc_button_release_event(event) {
this._removeLongPressTimeout();
return super.vfunc_button_release_event(buttonEvent);
return super.vfunc_button_release_event(event);
}
vfunc_touch_event(touchEvent) {
if (touchEvent.type === Clutter.EventType.TOUCH_BEGIN)
vfunc_touch_event(event) {
if (event.type() === Clutter.EventType.TOUCH_BEGIN)
this._setLongPressTimeout();
else if (touchEvent.type === Clutter.EventType.TOUCH_END)
else if (event.type() === Clutter.EventType.TOUCH_END)
this._removeLongPressTimeout();
return super.vfunc_touch_event(touchEvent);
return super.vfunc_touch_event(event);
}
activate() {