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

[develop] .ToEto().ToNative() should return the original control #2601

Open
cyanfish opened this issue Dec 17, 2023 · 2 comments
Open

[develop] .ToEto().ToNative() should return the original control #2601

cyanfish opened this issue Dec 17, 2023 · 2 comments

Comments

@cyanfish
Copy link
Contributor

cyanfish commented Dec 17, 2023

I'm not sure if this was already going to be addressed before the next version, but I was using develop and had this issue with GTK, presumably related to #2590:

var gtkControl = new Gtk.Overlay();
gtkControl.ToEto().ToNative() != gtkControl // Instead it's a new Gtk.EventBox

I haven't tested if other platforms have similar issues.

Edit: And similarly:

var control1 = gtkControl.ToEto();
var control2 = gtkControl.ToEto();

Ends up with control1 just being an orphaned EventBox with no contents.

@cwensley
Copy link
Member

cwensley commented Mar 8, 2024

Thanks for the report. Yes, this should always return the same object and that change was an oversight.

cyanfish added a commit to cyanfish/naps2 that referenced this issue Mar 16, 2024
fabiante pushed a commit to DEXPRO-Solutions-GmbH/naps2 that referenced this issue Mar 18, 2024
@cyanfish
Copy link
Contributor Author

Testing on WinForms, it doesn't seem to have the same issue but there is a different regression for (at least) key events:

var listview = new swf.ListView().ToEto();
listview.KeyDown += ...; // doesn't fire

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