On Tue Mar 11 09:22:36 2025 +0000, Rémi Bernon wrote:
Do we really need to call back into wineserver? Seems unfortunate, maybe there's a better way?
I don't see how to avoid that in principle?
- the logic is triggered by calling DefWindowProc, so we can't avoid some action from DefWindowProc; - after WM_POINTERUPDATE with changing coordinates the messages should be generated (and, separately, updating cursor position) regardless of DefWindowProc calls; also generating that in DefWindowProc ever is clumsy because NtUserSendHardwareInput() can't generate the exact message we need, that would need some custom interface (and won't avoid a server call to send message anyway); - we could in principle stop sending those `track_mouse_from_pointer` calls once the tracking switched to server side (by returning the corresponding flag from this call and tracking this part of state in thread data), but we also want to update driver cursor position which seems to cope nicely with this call, in that case it would need to be done in some other more complicated ways. So reducing the amount of those calls (by not sending them once server tracking started) is possible but it will require these parts. I thought it doesn't add too much of calls, do you think it worth it?