On Wed Feb 26 18:15:07 2025 +0000, Patrick Laimbock wrote:
I tested 10.2 + this patch. The position of the cursor and the actual location where it clicks are still quite different. Situation 1: the "Spire/Spire" window (see movie) is located at the top left of the screen. Result: the location of the pointer and where it clicks are offset downwards. Situation 2: I put the "Spire/Spire" window in the center of the screen. Result: the offset between the cursor and where it clicks is increased substantially both down and to the right. I added a short movie where you can see it happen. If you need the output of WINEDEBUG can you please let me know which options need to be enabled? 
I don't know what is missing between 10.2 and HEAD. I just tested…
```sh git fetch origin merge-requests/7429/head git checkout FETCH_HEAD ./configure --prefix="$HOME/Source/wine-build" --enable-archs=i386,x86_64 make -j`nproc` make install ```
…and the mouse events are registered **correctly**. The only thing that _might_ be unusual is the amount of duplicate/repetitive calls, like `:win:GetWindowRect` (I'm guessing this is one event cascaded for each window: host, parent, wrapper, wine)
<details> <summary>very small snippet from log</summary> <pre> :win:NtUserTrackMouseEvent size 24, flags 0x2, hwnd 0x10076, time 0 :message:spy_enter_message (0x10076) L"{JUCE_195448f5}" [0084] WM_NCHITTEST sent from self wp=00000000 lp=00f60169 :message:spy_exit_message (0x10076) L"{JUCE_195448f5}" [0084] WM_NCHITTEST returned 00000001 :win:window_from_point scope 0x10076 (361,246) returning 0x10076 :win:NtUserTrackMouseEvent point (361,246) hwnd 0x10076 hittest 1 :msg:NtUserSetSystemTimer window 0x10076, id 0xfffa, timeout 400 :cursor:LoadCursorW 0000000000000000, #7f00 :cursor:CURSORICON_Load 0000000000000000, #7f00, 0x0, depth 32, fCursor 1, flags 0x8040 :cursor:NtUserSetCursor 0x20054 :win:GetWindowRect hwnd 0000000000010076 (0,0)-(805,460) :win:GetWindowRect hwnd 0000000000010076 (0,0)-(805,460) :win:GetWindowRect hwnd 0000000000010076 (0,0)-(805,460) :win:GetWindowRect hwnd 0000000000010076 (0,0)-(805,460) :message:spy_enter_message (0x10076) L"{JUCE_195448f5}" [0084] WM_NCHITTEST sent from self wp=00000000 lp=00f60169 :message:spy_exit_message (0x10076) L"{JUCE_195448f5}" [0084] WM_NCHITTEST returned 00000001 :win:window_from_point scope 0x10020 (361,246) returning 0x10076 :win:GetWindowRect hwnd 0000000000010076 (0,0)-(805,460) :message:spy_exit_message (0x10076) L"{JUCE_195448f5}" [0200] WM_MOUSEMOVE returned 00000000 :msg:peek_message got type 6 msg 113 (WM_TIMER) hwnd 0x10072 wp 539 lp 0 :message:spy_enter_message (0x10072) L"yabridge plugin" [0113] WM_TIMER dispatched wp=00000539 lp=00000000 :message:spy_exit_message (0x10072) L"yabridge plugin" [0113] WM_TIMER returned 00000000 :event:merge_events discarding duplicate MotionNotify for window 2600003 :event:call_event_handler 207 MotionNotify for hwnd/window 0x10072/2600003 :cursor:X11DRV_MotionNotify hwnd 0x10072/2600003 pos 354,243 is_hint 0 serial 207 :cursor:map_event_coords hwnd 0x10072, window 2600003, event_root 402, x_root 1189, y_root 720, input 0x7ffffe0ff8f0 :cursor:map_event_coords mapped (354,243) to (354,243) :event:process_events processed 2 events, returning 1 :msg:peek_message got type 7 msg 200 (WM_MOUSEMOVE) hwnd 0x10072 wp 0 lp 0 :message:spy_enter_message (0x10076) L"{JUCE_195448f5}" [0084] WM_NCHITTEST sent from self wp=00000000 lp=00f30162 :message:spy_exit_message (0x10076) L"{JUCE_195448f5}" [0084] WM_NCHITTEST returned 00000001 :win:window_from_point scope 0x10072 (354,243) returning 0x10076 :message:spy_enter_message (0x10076) L"{JUCE_195448f5}" [0020] WM_SETCURSOR sent from self wp=00010076 lp=02000001 :message:spy_enter_message (0x10076) DefWindowProc:[0020] WM_SETCURSOR wp=00010076 lp=02000001 :message:spy_enter_message (0x10072) L"yabridge plugin" [0020] WM_SETCURSOR sent from self wp=00010076 lp=02000001 :msg:WINPROC_CallProcWtoA (hwnd=0000000000010072,msg=WM_SETCURSOR,wp=00010076,lp=02000001) :message:spy_enter_message (0x10072) DefWindowProc:[0020] WM_SETCURSOR wp=00010076 lp=02000001 :message:spy_exit_message (0x10072) DefWindowProc: [0020] WM_SETCURSOR returned 00000000 :message:spy_exit_message (0x10072) L"yabridge plugin" [0020] WM_SETCURSOR returned 00000000 :message:spy_exit_message (0x10076) DefWindowProc: [0020] WM_SETCURSOR returned 00000000 :message:spy_exit_message (0x10076) L"{JUCE_195448f5}" [0020] WM_SETCURSOR returned 00000000 :message:spy_enter_message (0x10076) L"{JUCE_195448f5}" [0200] WM_MOUSEMOVE dispatched wp=00000000 lp=00f30162 :msg:WINPROC_CallProcAtoW (hwnd=0000000000010076,msg=WM_MOUSEMOVE,wp=00000000,lp=00f30162) :win:GetWindowRect hwnd 0000000000010076 (0,0)-(805,460) :win:GetWindowRect hwnd 0000000000010076 (0,0)-(805,460) :message:spy_enter_message (0x10076) L"{JUCE_195448f5}" [0084] WM_NCHITTEST sent from self wp=00000000 lp=00f30162 :message:spy_exit_message (0x10076) L"{JUCE_195448f5}" [0084] WM_NCHITTEST returned 00000001 :win:window_from_point scope 0x10020 (354,243) returning 0x10076 :win:GetWindowRect hwnd 0000000000010076 (0,0)-(805,460) :win:GetWindowRect hwnd 0000000000010076 (0,0)-(805,460) :win:GetWindowRect hwnd 0000000000010076 (0,0)-(805,460) :win:GetWindowRect hwnd 0000000000010076 (0,0)-(805,460) </pre> </details>
I'll eventually get this log into the bug tracker, since—unless I built or called the wrong Wine source/binary—it looks like this will resolve mouse clicks.
I'd have to check my plugins to see if any have context menus as that was another yabridgectl complaint not resolved by removing `else if (event_root == root_window) pt = root_to_virtual_screen( x_root, y_root );`. Valhalla DSP doesn't have menus, and the rest are installed on a different computer.
Env vars: ```txt WINEDEBUG=+x11drv,+event,+cursor,+win,+msg,+message,+hid YABRIDGE_DEBUG_FILE=yabridge-log.txt YABRIDGE_DEBUG_LEVEL=1+editor ```
Thanks for this MR!