Stage ignores mouseMove and touchDown events when moving mouse along upper bound
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 25.4k
- Forks
- 6.5k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 5
Description
Issue details
In GWT fullscreen mode Stage ignores mouseMove and touchDown events when moving mouse along upper bound.
Reproduction steps/code
When moving mouse along Stage's upper bound then the following is true:
Gdx.graphics.getHeight() - screenY == viewport.getScreenY() + viewport.getScreenHeight()
The methods Stage#mouseMoved and Stage#touchDown both contain the following check:
if (Gdx.graphics.getHeight() - screenY < viewport.getScreenY()
|| Gdx.graphics.getHeight() - screenY >= viewport.getScreenY() + viewport.getScreenHeight()) return false;
which ignores the events when moving mouse along upper bound.
This check in both places should be changed to:
if (Gdx.graphics.getHeight() - screenY < viewport.getScreenY()
|| Gdx.graphics.getHeight() - screenY > viewport.getScreenY() + viewport.getScreenHeight()) return false;
Version of LibGDX and/or relevant dependencies
all
Stacktrace
n/a
Please select the affected platforms
- Android
- iOS (robovm)
- iOS (MOE)
- HTML/GWT
- Windows
- Linux
- MacOS
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with Stage#mouseMoved and Stage#touchDown, where the viewport-boundary check is shown in the issue. Verify the upper-bound condition accepts events at the viewport edge, then reproduce the HTML/GWT case by moving along the Stage’s upper bound and confirm both mouseMove and touchDown are handled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100