Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

frame key double press consistency #614

Merged
merged 1 commit into from
Nov 17, 2015
Merged

Conversation

quozl
Copy link
Contributor

@quozl quozl commented Nov 17, 2015

When the frame key is pressed rapidly, some presses are ignored, because the animation position is used to determine if the frame is visible.

To fix,

  • remove class _KeyListener as it is not required, see also 3e28f56,
  • add a flag for whether the frame is wanted or not, self._wanted,
  • add a toggle() method, which calls show() or hide() according to last known wanted state, and call it from the mouse enter corner or frame key press methods,
  • do not test frame visibility in show() or hide(), depend on _wanted,
  • in the gesture handler, use toggle() instead of show() or hide(),

Test case:

    xdotool key F6 key F6 key F6

should be equivalent in final effect to

    xdotool key F6

Fixes #4806.

When the frame key is pressed rapidly, some presses are ignored, because
the animation position is used to determine if the frame is visible.

To fix,

- remove class _KeyListener as it is not required, see also 3e28f56,

- add a flag for whether the frame is wanted or not, self._wanted,

- add a toggle() method, which calls show() or hide() according to last
  known wanted state, and call it from the mouse enter corner or frame
  key press methods,

- do not test frame visibility in show() or hide(), depend on _wanted,

- in the gesture handler, use toggle() instead of show() or hide(),

Test case:

	xdotool key F6 key F6 key F6

should be equivalent in final effect to

	xdotool key F6

Fixes #4806 https://bugs.sugarlabs.org/ticket/4806
@samdroid-apps
Copy link
Contributor

Another way to reproduce the issue: move your mouse in and out of the corners with about 0.5sec between each corner activation

@samdroid-apps samdroid-apps added this to the 0.108 Features milestone Nov 17, 2015
@samdroid-apps
Copy link
Contributor

Great patch, it makes sugar feel much more responsive. I'll merge it.

@samdroid-apps samdroid-apps merged commit 41fae0b into sugarlabs:master Nov 17, 2015
@quozl quozl deleted the 4806-a branch September 11, 2019 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants