Details
-
Bug
-
Resolution: Won't Do
-
Major
-
None
-
None
-
None
Description
After tests (WinXP) and code review I found these problems:
1) Changes should apply to the current process/thread only.
2) Focus should stay in the input (focused) window.
My C is rusty, ATM I cannot provide patches, but some suggestions:
1) EnumWindowsProc should be removed, only the current thread should receive the WM_INPUTLANGCHANGEREQUEST in ActivateLayout.
Dunno whether keyboard management by process/thread is implemented at all.
2) When WndProc receives WM_NOTIFYICONMSG WM_R/LBUTTONUP it should preserve the previously focused window, before SetForegroundWindow. When done with the popup menu the focus should be set back to that window. Is SetForegroundWindow required at all, to show the menu?
Further issues:
3) AddTrayIcon can call UpdateTrayIcon for the major part of icon creation. Less code to maintain.
4) The icon and menu ID can be obtained by
GetLocaleInfo(LOWORD(hkl), LOCALE_SABBREVNAME, szLCID, 3); //first two chars only
(if already implemented in GetLocaleInfo) (Done)
5) The tray icon should be updated only when the change has been accepted by the current (affected) process. Use WM_INPUTLANGCHANGE instead of WM_INPUTLANGCHANGEREQUEST, check result for accepted/rejected?
Eventually the really used layout should be retrieved from the process after that message?
6) KbSwitchDeleteHooks eventually should reset the hook handles, to prevent multiple removes.
Attachments
Issue Links
- is blocked by
-
CORE-13145 LiveCD has no kbswitch key combination by default
- Resolved
-
CORE-13814 kbswitch 's key combination does not work reliably
- Resolved
-
CORE-14240 kbswitch tray icon doesn't react to color scheme change
- Resolved
-
CORE-16250 kbswitch: Trouble with keyboard layouts.
- Resolved
-
CORE-18417 katahiromz's fakemenu 0.5 bugs
- Resolved
-
CORE-18924 Problem with switching keyboard layout
- Resolved
-
CORE-11737 The keyboard layout does not change by shortcut keys (Alt + Shift)
- Resolved
-
CORE-18364 Keyboard layout inconsistent change
- Resolved
- relates to
-
CORE-18872 LiveCD booted as german shows EN as default keyboard layout in kbswitch tray icon, while it *is* acting german layout actually
- Resolved
-
CORE-19362 ctfmon.exe is needed to support Language Bar
- Untriaged