On Tue Sep 30 17:14:36 2025 +0000, Paul Gofman wrote:
Well, yeah, thinking of it, it is probably better to make mouse tracking fully per thread, with tracking data also stored in thread data as comment near tracking_info suggests: "FIXME: move tracking stuff into per-thread data"? But that would probably mean that NtUserTrackMouseEvent() can initialize the tracking info only for the current thread. Do you think we can add a WM_WINE_ message to send it when NtUserTrackMouseEvent is called for the other thread? Then, all the mouse tracking info will be contained per thread and update_current_mouse_window() will be also per-thread. As a side effect, that should make NtUserTrackMouseEvent() work for other process window (the case on Windows, doesn't work on Wine now).
There is a question what to do with TME_QUERY in this case. And I tested that TME_QUERY always returns zero data when called from the other thread than the tracked window belongs to (while TrackMouseEvent works for setting up tracking from other thread and other process).