[Bug 2981] direct input device only works when created in the thread which created the window

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[Bug 2981] direct input device only works when created in the thread which created the window

Wine - Bugs mailing list

------- Additional Comments From [hidden email]  2005-28-05 08:20 -------
Quoting MSDN about SetWindowsHookEx:


[in] Specifies the identifier of the thread with which the hook procedure is to
be associated. If this parameter is zero, the hook procedure is associated with
all existing threads running in the same desktop as the calling thread.

The case of zero is exactly what I believe is not handled, but ironically, is
what the implementor of the dinput keyboard in Wine is relying on. As I said,
fixing that would also work, but it needs a more knowledgeable person of the
wine internals to help with it (either getting a list of all threads in the
current process ("desktop" in MSDN), and always using all hooks where tid = 0,
or modifying the hooks stuff so additionally to per-thread hooks, there are
global hooks). For both, I'd need some advice, and generally a Wine developer
would be more apt to create a patch.)

About the user32 include, all I use out of it is this:

static inline struct user_thread_info *get_user_thread_info(void)
    return (struct user_thread_info *)NtCurrentTeb()->Win32ClientInfo;

So whoever applies it can simply move that into keyboard.c. Or should I do it
and re-submit the patch?

Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.