forked from AuroraMiddleware/gtk
macos: make transient-for key window when hiding surface
This only handled the popover case before and not the transient-for case.
This commit is contained in:
parent
4ced1c90f1
commit
84014e3414
@ -219,10 +219,17 @@ gdk_macos_surface_hide (GdkSurface *surface)
|
||||
|
||||
if (was_key)
|
||||
{
|
||||
GdkSurface *parent;
|
||||
|
||||
if (GDK_IS_TOPLEVEL (surface))
|
||||
parent = surface->transient_for;
|
||||
else
|
||||
parent = surface->parent;
|
||||
|
||||
/* Return key input to the parent window if necessary */
|
||||
if (surface->parent != NULL && GDK_SURFACE_IS_MAPPED (surface->parent))
|
||||
if (parent != NULL && GDK_SURFACE_IS_MAPPED (parent))
|
||||
{
|
||||
GdkMacosWindow *parentWindow = GDK_MACOS_SURFACE (surface->parent)->window;
|
||||
GdkMacosWindow *parentWindow = GDK_MACOS_SURFACE (parent)->window;
|
||||
|
||||
[parentWindow showAndMakeKey:YES];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user