Re: [1/3] winex11.drv: Support KEYEVENTF_UNICODE in SendInput
Andrew Eikum wrote:
---
Why did you swapped setting internal key state and calling hook in X11DRV_send_keyboard_input()? Do you have a test to check that state is being updated _before_ calling hook, and not after? Vitaliy.
Vitaliy Margolen wrote:
Andrew Eikum wrote:
---
Why did you swapped setting internal key state and calling hook in X11DRV_send_keyboard_input()? Do you have a test to check that state is being updated _before_ calling hook, and not after?
Vitaliy.
Good point. The MSDN hook documentation implies that the hook call should happen before any state changes, and I don't have any reason to change it. After fixing that, was there anything else obviously wrong? Otherwise I'll re-send the attached patch. Thanks Andrew
Andrew Eikum wrote:
Vitaliy Margolen wrote:
Andrew Eikum wrote:
---
Why did you swapped setting internal key state and calling hook in X11DRV_send_keyboard_input()? Do you have a test to check that state is being updated _before_ calling hook, and not after?
Vitaliy.
Good point. The MSDN hook documentation implies that the hook call should happen before any state changes, and I don't have any reason to change it. After fixing that, was there anything else obviously wrong? Otherwise I'll re-send the attached patch.
Nothing that MSDN says about hooks can be trusted. They don't mention about 80% of things that's going on there and about 50% of all apps relay on... The patch looks good with exception of some unneeded formatting changes:
- if (event_flags & KEYEVENTF_KEYUP) + if(!(event_flags & KEYEVENTF_UNICODE)) Space between "if" and braces.
- TRACE_(key)(" wParam=%04x, lParam=%08lx, InputKeyState=%x\n", - wVk, MAKELPARAM( 1, flags ), key_state_table[wVk] ); + TRACE_(key)("message=0x%04x wParam=0x%04x lParam=0x%08lx\n", + message, wVk, lParam); Second raw of params was aligned with the opening brace.
Vitaliy.
participants (2)
-
Andrew Eikum -
Vitaliy Margolen