-
Notifications
You must be signed in to change notification settings - Fork 26
Update KeyboardLayoutHelper and AppBarWindow #54
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
base: master
Are you sure you want to change the base?
Conversation
helper = new WindowInteropHelper(this); | ||
Handle = helper.Handle; | ||
|
||
WindowHelper.SetWindowNoActivate(Handle); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why? Generally AppBars should be able to take focus.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it will take a focus, Windows-like layout switcher located on menu bar wouldn't able to switch current layout language for focused window. (because it will take focus for itself)
It doesn't matter when keyboard layout is system-wide in Windows. (but if layout is window-wide that will cause some problems that I had encountered)
We can remember last window that was focused before Cairo and then change it layout, but it will be a strange workaround imo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Taskbar.behavior.mp4
Cairo.behavior.mp4
Cairo.behavior.without.WS_EX_NOACTIVATE.mp4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The AppBar should still take focus (e.g., so you can change the input method for Cairo when searching), what shouldn't take focus is only the input indicator (e.g., so that you can change the input method for the current app window if enabled).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about this way, but how it could be implemented?
p.s. interesting to find out, why it should take focus?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try to make sure that the input indicator control does not receive focus when clicked.
If I remember correctly, some AppBars, as in RetroBar, need focus for the windows to be behind the taskbar.
Ah, I forgot about different layout types, so I'm implementing it now... |
There is no way to get KLID (keyboard layout ID) from HKL (locale identifier) or current KLIDs list, that's bad. So the only workaround is... switch to every layout and get every KLID for layout type determining. Also we can't get localized keyboard layout names. :( |
I did some work a while back attempting this with Cairo. Let me see if I can see what I got locally. |
@josuave Did you find this by chance? |
Most changes come from: cairoshell#54
No description provided.