Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Language Bar icon incorrectly dislpayed while using Google Chrome #5

Open
Rohupt opened this issue Mar 15, 2022 · 13 comments
Open

Language Bar icon incorrectly dislpayed while using Google Chrome #5

Rohupt opened this issue Mar 15, 2022 · 13 comments

Comments

@Rohupt
Copy link

Rohupt commented Mar 15, 2022

The Language Bar icon says that the IME is disabled when using in Google Chrome, but it's actually working.
image

@saschanaz
Copy link
Owner

That doesn't happen here 🤔 Does it happen on any other app?

@saschanaz
Copy link
Owner

saschanaz commented Mar 15, 2022

(I'll only fix a regression, I won't fix anything if a bug was already there in the demo project)

@Rohupt
Copy link
Author

Rohupt commented Mar 15, 2022

That doesn't happen here 🤔 Does it happen on any other app?

Yes, it‘s quite randomly: the input mode indication appears on VS, Sublime Text, Notepad, Windows Terminal, etc.; but it appears "disabled" (still working) on Chrome, Word, VS Code (and maybe others). It's disabled for real on File Explorer and Discord.

I think it's from the demo project, can you at least provide me some guides on how to fix it?

@saschanaz
Copy link
Owner

It doesn't happen at all on Chrome, vscode, nor Word on my machine, so I have no advice...

@saschanaz
Copy link
Owner

Perhaps check if your apps are all x64? 🤔

@Rohupt
Copy link
Author

Rohupt commented Mar 15, 2022

Yeah, it doesn't work at all on 32-bit applications (except Teams), and falsely "disabled" in some of the 64-bit ones (Chrome, Word,...).

In the demo project it only worked on Metro apps but not desktop apps. What did you change for it to work on desktop apps?

@saschanaz
Copy link
Owner

saschanaz commented Mar 15, 2022

Hmm? The demo project has no behavioral difference with the current port, again on my machine 🤔 I don't intend to do any fix here, so I didn't do anything about it.

@Rohupt
Copy link
Author

Rohupt commented Mar 15, 2022

The original documentation says this:

This implementation works only for Windows Store apps that use the built-in edit controls. This implementation won't work if the app uses the custom edit control from the subset of Text Service Framework (TSF) APIs available in the Windows Runtime.

And it indeed doesn't work on anything but Windows Store apps on my machine, so I just assumed it was true. But this one does work on some of the desktop apps.

I'm starting to think that it's my machine that's the problem, but do you happen to have any idea about it?

@saschanaz
Copy link
Owner

I'm starting to think that it's my machine that's the problem, but do you happen to have any idea about it?

You mean you see the same behavior with the original demo? I'm not sure, all I know at this point is that GUID_COMPARTMENT_KEYBOARD_DISABLED is related, which is used in CSampleIME::_IsKeyboardDisabled. I haven't touched that part, so I barely knows anything there.

@Rohupt
Copy link
Author

Rohupt commented Mar 15, 2022

You mean you see the same behavior with the original demo? I'm not sure, all I know at this point is that GUID_COMPARTMENT_KEYBOARD_DISABLED is related, which is used in CSampleIME::_IsKeyboardDisabled. I haven't touched that part, so I barely knows anything there.

So I removed the 2 lines that use it, and the mode indicator appeared again, and it started to work on File Explorer. The same thing still didn't apply with the original demo though.

My machine started to act a bit funny (Explorer and Chrome each suddenly terminated once when I was changing the mode/language), but I guess it's solved? (Probably you should put a line or two into the readme.)

@saschanaz
Copy link
Owner

So I removed the 2 lines that use it

Which lines, specifically? I only see one caller of _IsKeyboardDisabled.

The same thing still didn't apply with the original demo though.

You mean you see the same behavior even if you remove those lines from the original demo?

@Rohupt
Copy link
Author

Rohupt commented Mar 15, 2022

I removed lines 229 and 230 of KeyEventSink.cpp:

        CCompartment CompartmentKeyboardDisabled(_pThreadMgr, _tfClientId, GUID_COMPARTMENT_KEYBOARD_DISABLED);
        CompartmentKeyboardDisabled._GetCompartmentBOOL(isDisabled);

And yes, when I removed those lines from the original demo I didn't see any change.

But on another note, even one of the IMEs that had been working well until recently started to act up the same way as this issue, so maybe my Windows is corrupted somewhere.

@Rohupt
Copy link
Author

Rohupt commented Aug 10, 2022

But on another note, even one of the IMEs that had been working well until recently started to act up the same way as this issue, so maybe my Windows is corrupted somewhere.

I have to readdress this, but after installing this both the Japanese and Korean IMEs in my machine start acting up. The secondary typing mode button (the A/あ and A/가 buttons) all replaced by this one's (originally 英/中).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants