-
Notifications
You must be signed in to change notification settings - Fork 570
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
Failure to deliver mouse events outside of the window #541
Comments
Does the Cocoa backend send all mouse events when the point is outside the window bounds? It is pretty important for all backends to do that so that you can eg continue to drag scrollbars when the mouse leaves the window, but as the Cocoa is the current "gold standard" backend it would be good to get the behavior the same on GTK (and Windows if it is not already) then upgrade them all to send all mouse events if necessary. |
These are slightly different issues: when a mouse button is pressed inside our window we want to capture all events, (see #457) but if the mouse is not pressed we only need to know if it has left the window. Cocoa does just give us all the events while we are the frontmost window, but I don't think it is critical for other backends to emulate this exactly. |
I might not be understanding everything, but I think the issue here is when the mouse is pressed inside the window, then dragged away while the button is held down. I haven't validated this, but my impression is that macOS continues to deliver mouse events until button-up, while Windows does not do this by default, but does provide a SetCapture function that can provide this behavior. |
that is a separate issue (#457). This is for knowing when the mouse has left the window when there is no mouse button pressed. |
Ah ok, disregard then. |
Do we want this to simply be a mousemoved event with coordinates outside the window, or do we want to have a separate mouseleave event that specifically indicates that? I believe that on Cocoa the right way to that is a mouseExited: event after setting up a tracking area. |
things are working fine on cocoa, which always delivers mouse events to the active window. The easiest course of action is to just deliver a mousemoved event with coordinates outside the window on other platforms. |
Druid expects to receive a mouse move event when the mouse moves outside of the window.
This currently is not delivered on the gtk backend. I haven't tested on windows, but I suspect it may have a similar problem.
It is not necessary that we receive all events outside the window, but it is pretty important that we receive at least one. On platforms that have mouse entered/exited notifications, it would be acceptable to handle that on the platform and send
mouse_moved
to druid-shell then.The text was updated successfully, but these errors were encountered: