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

Native window/view embedding support (target: stable) #3473

Open
wants to merge 6 commits into
base: stable/0.9
from

Conversation

@kekekeks
Copy link
Member

kekekeks commented Jan 26, 2020

The API is somewhat similar to HwndHost, but we are actually providing default implementations for native view creation destruction to simplify interop with libraries that want a pre-existing one.

Note: this PR is targeting 0.9 branch.

Fixes #6

@kekekeks kekekeks changed the base branch from master to stable/0.9 Jan 26, 2020
@kekekeks kekekeks changed the title [WIP] Native window/view embedding support Native window/view embedding support Jan 28, 2020
@kekekeks kekekeks requested review from danwalmsley and grokys Jan 28, 2020
focused = focused.VisualParent;

if (focused == this)
KeyboardDevice.Instance.SetFocusedElement(null, NavigationMethod.Unspecified, InputModifiers.None);

This comment has been minimized.

Copy link
@kekekeks

kekekeks Jan 29, 2020

Author Member

@grokys this code is moved from our winforms host where it was since forever. But I'm not sure if that's the correct way of informing our focus management system that the current window has lost focus and it's now held by a child window.

This comment has been minimized.

Copy link
@grokys

grokys Feb 4, 2020

Member

Yeah our focus management has no concept of child windows so not sure we can do much better than this with the way things stand.

@grokys
grokys approved these changes Feb 4, 2020
Copy link
Member

grokys left a comment

We probably need refactor things to make focus handling with embedded windows sane, but LGTM for now.

@grokys

This comment has been minimized.

Copy link
Member

grokys commented Feb 4, 2020

BTW, should we target this to master and then merge it to a release branch?

@kekekeks

This comment has been minimized.

Copy link
Member Author

kekekeks commented Feb 4, 2020

I was thinking of making a separate 0.9-native-embed branch and once it's in acceptable state rebase the PR to master.

@kekekeks kekekeks force-pushed the foreign-embed branch from 65c5ae1 to c24b029 Feb 7, 2020
@kekekeks kekekeks force-pushed the foreign-embed branch from 25084d4 to 7e8d7b6 Feb 7, 2020
@kekekeks kekekeks changed the title Native window/view embedding support Native window/view embedding support (target: stable) Feb 7, 2020
BOOL _isHandlingSendEvent;
}

- (void)sendEvent:(NSEvent *)event

This comment has been minimized.

This comment has been minimized.

Copy link
@kekekeks

kekekeks Feb 14, 2020

Author Member

It's not called by Chromium or CEF code. It's only required by helper CefScopedSendingEvent C++ class that also isn't used by CEF and is there for convenience purposes.

This comment has been minimized.

Copy link
@joaompneves

joaompneves Feb 14, 2020

Got an exception because of that missing bit

This comment has been minimized.

Copy link
@joaompneves

joaompneves Feb 14, 2020

Crashing on exception: -[AvnApplication setHandlingSendEvent:]: unrecognized selector sent to instance 0x7fb2a3595f90

@kekekeks kekekeks mentioned this pull request Feb 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.