From e1c107a094f46d93f7b9bfeb029cf30ecfbedc12 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Thu, 26 Jan 2012 10:11:17 +0100 Subject: [PATCH] Bug 667691 - implement gdk_window_restack() for Quartz Apply patch from Paul Davis which implements this missing function. (cherry picked from commit 5f48cfe4918d54d91ec2a87877be6a19b6d43b45) --- gdk/quartz/gdkwindow-quartz.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/gdk/quartz/gdkwindow-quartz.c b/gdk/quartz/gdkwindow-quartz.c index 82e79dc73d..f579844f7c 100644 --- a/gdk/quartz/gdkwindow-quartz.c +++ b/gdk/quartz/gdkwindow-quartz.c @@ -1630,7 +1630,18 @@ gdk_window_quartz_restack_toplevel (GdkWindow *window, GdkWindow *sibling, gboolean above) { - /* FIXME: Implement this */ + GdkWindowImplQuartz *impl; + gint sibling_num; + + impl = GDK_WINDOW_IMPL_QUARTZ (sibling->impl); + sibling_num = [impl->toplevel windowNumber]; + + impl = GDK_WINDOW_IMPL_QUARTZ (window->impl); + + if (above) + [impl->toplevel orderWindow:NSWindowAbove relativeTo:sibling_num]; + else + [impl->toplevel orderWindow:NSWindowBelow relativeTo:sibling_num]; } static void