Skip to content
This repository was archived by the owner on Oct 4, 2021. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2364,7 +2364,8 @@ Windows.GtkWPFWidget GetFocusedWpfWidget ()
Gtk.Widget GetFocusedChild (Control widget)
{
Gtk.Container container;

if (widget?.nativeWidget is AppKit.NSWindow window)
widget = Mac.GtkMacInterop.GetGtkWindow (window)?.Child;
do {
container = widget?.nativeWidget is Gtk.Container ? widget.GetNativeWidget<Gtk.Container> () : null;
if (container != null) {
Expand All @@ -2376,7 +2377,7 @@ Gtk.Widget GetFocusedChild (Control widget)
}
} while (container != null);

return widget.nativeWidget is Gtk.Widget ? widget : null;
return widget?.nativeWidget is Gtk.Widget ? widget : null;
}

#if MAC
Expand Down