リビジョン | 78e2c1ccbe8fec446a2963351786a1f7a73dbadb (tree) |
---|---|
日時 | 2014-09-11 22:22:27 |
作者 | Kazuhiro Fujieda <fujieda@user...> |
コミッター | Kazuhiro Fujieda |
Fix the bug where the hook state remains unchanged when IE10 or later has the keyboard focus
In xkeymacs-110830, the hook state remains unchanged when the keyboard
focus moves from another application to IE10 or later. After the change
of 55ddea2, the hook stays disabled in IE10 or later.
To change the hook state, CXkeymacsDll::CallWndProc calls
InitKeyboardProc when an appliation get the keyboard focus. It calls
only when the window is the foreground window. Each tab window in IE10
or later belong to a different process and does not become
foreground. So InitKeyboardProc is not called and the hook mode remains
unchanged.
To fix this bug, CallWndProc should call InitKeyboardProc even if the
focused window is not foreground.
@@ -270,11 +270,9 @@ LRESULT CALLBACK CXkeymacsDll::CallWndProc(int nCode, WPARAM wParam, LPARAM lPar | ||
270 | 270 | InitKeyboardProc(); |
271 | 271 | break; |
272 | 272 | case WM_SETFOCUS: |
273 | - if (cwps->hwnd == GetForegroundWindow()) { | |
274 | - AppName::SetIMEState(false); | |
275 | - InitKeyboardProc(); | |
276 | - ShowHookState(); | |
277 | - } | |
273 | + AppName::SetIMEState(false); | |
274 | + InitKeyboardProc(); | |
275 | + ShowHookState(); | |
278 | 276 | break; |
279 | 277 | case WM_NCACTIVATE: |
280 | 278 | if (cwps->wParam && cwps->hwnd == GetForegroundWindow()) { |