Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-10667

kbswitch bugs and flaws



    • Bug
    • Resolution: Won't Do
    • Major
    • None
    • None
    • None


      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.


        Issue Links



              Unassigned Unassigned
              hpd Hans-Peter Diettrich
              2 Vote for this issue
              4 Start watching this issue