Jinoh Kang (@iamahuman) commented about dlls/win32u/winstation.c:
+} + +enum object_type +{ + OBJECT_TYPE_DESKTOP = 1, +}; + +static UINT get_thread_session_object_index( UINT tid, enum object_type type, UINT64 *id ) +{ + switch (type) + { + case OBJECT_TYPE_DESKTOP: + SERVER_START_REQ( get_thread_desktop ) + { + req->tid = tid; + if (wine_server_call_err( req )) return -1; We're setting Win32 LastError in GetCursorPos(). This is new (and probably untested) behavior.
```suggestion:-0+0 if (wine_server_call( req )) return -1; ``` --- **Apropos the bigger context of the entire [shared-memories][] branch:** I'm aware that `NtUserGetForegroundWindow()` does set Win32 LastError. In this case, we can either choose `wine_server_call_err` for `OBJECT_TYPE_INPUT` (not in this MR), or (ideally) refactor `get_thread_session_object_index` so that it returns NTSTATUS instead (again out of scope of this MR). [shared-memories]: <https://gitlab.winehq.org/rbernon/wine/-/commits/mr/shared-memories> -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3103#note_64973