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

HitTest event #2413

Open
msiglreith opened this issue Aug 9, 2022 · 1 comment · May be fixed by #3207
Open

HitTest event #2413

msiglreith opened this issue Aug 9, 2022 · 1 comment · May be fixed by #3207
Labels
S - api Design and usability

Comments

@msiglreith
Copy link
Member

Add a WindowEvent::HitTest(button, x, y, &mut Area) event which allows the user to specify special interaction areas on button clicks. Area maybe one of the borders, the caption, system buttons, etc. Inspired by the WM_NCHITTEST event.

Motivation

  • Mostly interesting for windows without decorations where we are usually required to emulate the system behavior.
  • On Windows, feedback of the internal WM_NCHITTEST seems to be used for certain system behavior, ie. snap layout when hovering the maximize button or screen reader support.
  • Unify the drag_ functions and hopefully improve the 'left button down'-guessing situation
@msiglreith msiglreith added the S - api Design and usability label Aug 9, 2022
@maroider
Copy link
Member

maroider commented Aug 10, 2022

This is something I admittedly contemplated when drag_window was being implemented, but I ultimately didn't bring it up since I wasn't confident it could be meaningfully generalized across platforms (but I suppose that's something we can figure out here).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S - api Design and usability
Development

Successfully merging a pull request may close this issue.

2 participants