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

mouse cursor tracking becomes slow when the SDL window has another window overlapping it #1807

Closed
nbriggs opened this issue Aug 16, 2024 · 2 comments · Fixed by Interlisp/maiko#509
Assignees

Comments

@nbriggs
Copy link
Contributor

nbriggs commented Aug 16, 2024

As reported by @hjellinek --

Further investigation shows that it is only observable when the cursor is tracking over a TEdit window in the exposed section of the Medley SDL window.

SDL passes mouse events through to the client regardless of whether the client window is fully exposed whether or not it has the keyboard input focus.

It's unclear exactly what actions in TEdit are provoking the slowdown, though it might be calls to ADJUSTCURSORPOSITION that bottom out in SDL_WarpMouseInWindow().

The X11 windows do not pass mouse motion events to the client window when it does not have the focus so explicitly implementing that in the SDL code may be a solution.

@rmkaplan
Copy link
Contributor

rmkaplan commented Aug 16, 2024 via email

@nbriggs
Copy link
Contributor Author

nbriggs commented Aug 16, 2024

I agree... but try building the maiko SDL version (before the patch for this) and see if it happens for you too.
I think it's a system issue, probably having to do with the ADJUSTCURSORPOSITION call that ends up in SDL_WarpMouseInWindow which might cause a screen redraw, which, when the window is mostly obscured either takes a long time or runs so fast it eats all the CPU.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants