Skip to content

Commit

Permalink
Fix first click being treated as both a single and double click by de…
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
Jing Wang authored and 3v1n0 committed Apr 18, 2024
1 parent 7c0e7e1 commit a576e21
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions indicatorStatusIcon.js
Original file line number Diff line number Diff line change
Expand Up @@ -420,13 +420,6 @@ class IndicatorStatusIcon extends BaseStatusIcon {
return Clutter.EVENT_PROPAGATE;
}

vfunc_button_release_event(event) {
if (!this._indicator.supportsActivation)
return this._maybeHandleDoubleClick(event);

return Clutter.EVENT_PROPAGATE;
}

vfunc_scroll_event(event) {
// Since Clutter 1.10, clutter will always send a smooth scrolling event
// with explicit deltas, no matter what input device is used
Expand Down

0 comments on commit a576e21

Please sign in to comment.