Fix first click being treated as both a single and double click by deleting vfunc_button_release_event by jingw · Pull Request #519 · ubuntu/gnome-shell-extension-appindicator (original) (raw)
…leting vfunc_button_release_event
Fixes #516
The problem is that both vfunc_button_press_event and vfunc_button_release_event call _maybeHandleDoubleClick the first time around, so a press+release becomes a double click. But the second time, this._indicator.supportsActivation has been set to true instead of undefined, so vfunc_button_release_event doesn't trigger the double click.
The deleted code cannot be useful because...
- if supportsActivation is false, _maybeHandleDoubleClick immediately returns EVENT_PROPAGATE
- if supportsActivation is true, vfunc_button_release_event skips _maybeHandleDoubleClick and returns EVENT_PROPAGATE
- if it's undefined and changes value, we get the aforementioned bug.