Skip to content

tests: cover the win32 backend mouse location#154

Open
DTW-Thalion wants to merge 1 commit into
gnustep:masterfrom
DTW-Thalion:tests/win32-mouse
Open

tests: cover the win32 backend mouse location#154
DTW-Thalion wants to merge 1 commit into
gnustep:masterfrom
DTW-Thalion:tests/win32-mouse

Conversation

@DTW-Thalion

Copy link
Copy Markdown
Contributor

Adds a test for the win32 display server -mouselocation and
-mouseLocationOnScreen:window:.

The cursor is moved to two known screen positions and the reported location is
checked: moving it right increases the reported x by the same amount, moving it
down decreases the reported y because the win32 top-left origin is flipped to
the GS bottom-left origin, and -mouseLocationOnScreen:window: reports the same
point as -mouselocation. The cursor is restored afterwards.

It builds only for the win32+cairo backend and skips when the backend cannot be
reached, so it is inert on the other backends and in CI.

Adds a test for the win32 display server -mouselocation and
-mouseLocationOnScreen:window:.

The cursor is moved to two known screen positions and the reported location is
checked: moving it right increases the reported x by the same amount, moving it
down decreases the reported y because the win32 top-left origin is flipped to
the GS bottom-left origin, and -mouseLocationOnScreen:window: reports the same
point as -mouselocation.  The cursor is restored afterwards.

It builds only for the win32+cairo backend and skips when the backend cannot be
reached, so it is inert on the other backends and in CI.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant