-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Use the focus proxy window in X11 #12751
Conversation
In this changeset, we set the input focus (XSetInputFocus) to an invisible auxiliary window instead of setting it to the main window. The intent is to make it possible to correctly switch the focus between the Avalonia window and an embedded window. Here's how XEmbed specification puts it: > [...] if the mouse pointer is within the embedded window, the outer toolkit doesn't see any key events, even if the logical keyboard focus is [] within the outer toolkits toplevel window. [...] The topmost toolkit is required to keep the X input focus on one of its own windows without any embedded children. Keeping the focus on such a window ensures that key events are always delivered to the outer toolkit and thus can be forwarded easily [...]. Source: https://specifications.freedesktop.org/xembed-spec/xembed-spec-latest.html In the case of DotNetBrowser, we will directly switch the focus back to the proxy window, when the logical focus passes from the embedded Chromium to the host Avalonia window.
You can test this PR using the following package version. |
Co-authored-by: Anna Dolbina <[email protected]>
You can test this PR using the following package version. |
@kekekeks a message from |
No idea, it's controlled by .NET Foundation bot |
Please, squash changes into a single commit, otherwise LGTM |
You can test this PR using the following package version. |
Use the focus proxy window in X11
In this changeset, we set the input focus (XSetInputFocus) to an invisible auxiliary window instead of setting it to the main window.
The intent is to make it possible to correctly switch the focus between the Avalonia window and an embedded window. Here's how XEmbed specification puts it:
Source: https://specifications.freedesktop.org/xembed-spec/xembed-spec-latest.html
In the case of DotNetBrowser, we will directly switch the focus back to the proxy window when the logical focus passes from the embedded Chromium to the host Avalonia window.
Checklist