ProgerXP / Notepad2e

Word highlighting, simultaneous editing, split views, math evaluation, un/grep, comment reformatting, UAC elevation, complete regexps (PCRE), Lua lexers, DPI awareness and more (XP+)
Other
376 stars 52 forks source link

Language indicator not updated #196

Open ProgerXP opened 6 years ago

ProgerXP commented 6 years ago

The language indicator #86 in the titlebar is not always updated. Scenario: repeatedly switch between a Notepad 2e window and some other window while switching the keyboard layout:

Keep notice of the titlebar. At some points, when switching to EN or from EN, the indicator won't be updated.

cshnik commented 6 years ago

Unfortunately, I was unable to reproduce the issue. Please check the build with the fix included and confirm the issue resolved or provide details on the issue (OS version, video, CPU load when the problem occur).

ProgerXP commented 5 years ago

Still happens regularly for me.

OS version, video, CPU load when the problem occur

Win10, no load.

I think it's best to add some logging to the debug log to gather what's happening.

cshnik commented 5 years ago

Do you mean language indicator is not updated when you switch global input language (for all applications) while Notepad2e is on the background (not a foreground window/minimized/etc)?

  1. In this case language indicator will be updated once Notepad2e get activated/focused.
  2. It looks like as designed since shell notification HSHELL_LANGUAGE is not dispatched for idle/inactive windows until they become foreground (in case of using thread specific ShellProc hook).
ProgerXP commented 5 years ago

while Notepad2e is on the background (not a foreground window/minimized/etc)?

No, I'm talking about a situation when switching layout even inside Notepad 2e, while it's focused and active, doesn't update the titlebar. But taskbar's language indicator does switch. I'm not sure what is causing it, it looks like Notepad doesn't even receive the message about the switch.

cshnik commented 5 years ago

Unfortunately, I was unable to reproduce the issue locally. However, there is an article which describes the possible reason and solution for the issue.

What changed is some of the behavior of the Language Bar (which became a fully programmable COM object that is documented in MSDN here).

The specific changes that affect it are:

The WM_INPUTLANGCHANGEREQUEST message is not posted when current input language is changed to a TSF Text Service; Even the WM_INPUTLANGCHANGE message is not sent if a TSF Text Service has already been activated in the thread (i.e. if you switch to it, switch to something else, and then switch back to it).

The fix is quite complicated and requires using of COM. Please confirm if we should proceed on this fix.

sergeevabc commented 3 years ago

Apart from the language indicator, is there a way to display Notepad2e in some language other than English?

ProgerXP commented 3 years ago

Apart from the language indicator, is there a way to display Notepad2e in some language other than English?

No, Notepad2 is inherently not localizable whatsoever. On top of that, hotkeys are especially tailored for English QWERTY users.