Since
78e2c1c, CallWndProc updates the current hook state on every
WM_SETFOCUS for IE10 or later. Firefox crushes by this on expanding a
movie to full screen. This fix makes CallWndProc update the state only
on foreground windows or IE tabs.
SetIMEState(false);\r
break;\r
case WM_SETFOCUS:\r
- SetIMEState(false);\r
- ShowHookState();\r
+ if (cwps->hwnd == GetForegroundWindow() || GetWindowLong(cwps->hwnd, GWL_STYLE) == 0x56000000) {\r
+ SetIMEState(false);\r
+ ShowHookState();\r
+ }\r
break;\r
case WM_NCACTIVATE:\r
if (cwps->wParam && cwps->hwnd == GetForegroundWindow()) {\r