[gtk/wip/chergert/gdk-macos-for-master: 1/2] macos: specify a window level for surfaces
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/gdk-macos-for-master: 1/2] macos: specify a window level for surfaces
- Date: Wed, 2 Dec 2020 18:16:20 +0000 (UTC)
commit ca8b00e87192570541e33c9320167b1146457210
Author: Christian Hergert <chergert redhat com>
Date: Wed Dec 2 10:15:43 2020 -0800
macos: specify a window level for surfaces
gdk/macos/gdkmacossurface.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/gdk/macos/gdkmacossurface.c b/gdk/macos/gdkmacossurface.c
index 2360e1c476..a081c818f6 100644
--- a/gdk/macos/gdkmacossurface.c
+++ b/gdk/macos/gdkmacossurface.c
@@ -505,6 +505,7 @@ _gdk_macos_surface_new (GdkMacosDisplay *display,
{
GdkFrameClock *frame_clock;
GdkMacosSurface *ret;
+ NSInteger window_level = NSNormalWindowLevel;
g_return_val_if_fail (GDK_IS_MACOS_DISPLAY (display), NULL);
@@ -521,10 +522,12 @@ _gdk_macos_surface_new (GdkMacosDisplay *display,
case GDK_SURFACE_POPUP:
ret = _gdk_macos_popup_surface_new (display, parent, frame_clock, x, y, width, height);
+ window_level = NSPopUpMenuWindowLevel;
break;
case GDK_SURFACE_TEMP:
ret = _gdk_macos_drag_surface_new (display, frame_clock, x, y, width, height);
+ window_level = NSPopUpMenuWindowLevel;
break;
default:
@@ -533,7 +536,10 @@ _gdk_macos_surface_new (GdkMacosDisplay *display,
}
if (ret != NULL)
- _gdk_macos_surface_monitor_changed (ret);
+ {
+ [ret->window setLevel:window_level];
+ _gdk_macos_surface_monitor_changed (ret);
+ }
g_object_unref (frame_clock);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]