From fbe4c4f8b61a6255125f7512b33e2100557812b4 Mon Sep 17 00:00:00 2001 From: Richard Hult Date: Wed, 20 Feb 2008 20:10:30 +0000 Subject: [PATCH] Set the right window level and shadow after recreating the window. 2008-02-20 Richard Hult * gdk/quartz/gdkwindow-quartz.c: (gdk_window_set_decorations): Set the right window level and shadow after recreating the window. * gdk/quartz/GdkQuartzView.c: (drawRect): Invalidate the shadow if necessary after drawing (bug #517338). svn path=/trunk/; revision=19622 --- ChangeLog | 8 ++++++++ gdk/quartz/GdkQuartzView.c | 6 ++++++ gdk/quartz/gdkwindow-quartz.c | 3 +++ 3 files changed, 17 insertions(+) diff --git a/ChangeLog b/ChangeLog index 3914cf4b4f..21e3663a2a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-02-20 Richard Hult + + * gdk/quartz/gdkwindow-quartz.c: (gdk_window_set_decorations): Set + the right window level and shadow after recreating the window. + + * gdk/quartz/GdkQuartzView.c: (drawRect): Invalidate the shadow if + necessary after drawing (bug #517338). + 2008-02-20 Marc-Andre Lureau * gtk/gtkbuilder.c (_gtk_builder_enum_from_string): fix missing diff --git a/gdk/quartz/GdkQuartzView.c b/gdk/quartz/GdkQuartzView.c index 511e6d1b99..44f21e5a4f 100644 --- a/gdk/quartz/GdkQuartzView.c +++ b/gdk/quartz/GdkQuartzView.c @@ -116,6 +116,12 @@ gdk_region_destroy (region); + /* Invalidate the window shadow for non-opaque views that have shadow + * enabled, otherwise the shadow doesn't get updated to what we draw. + */ + if (![self isOpaque] && [[self window] hasShadow]) + [[self window] invalidateShadow]; + GDK_QUARTZ_RELEASE_POOL; } diff --git a/gdk/quartz/gdkwindow-quartz.c b/gdk/quartz/gdkwindow-quartz.c index feb31d4fda..54238235b3 100644 --- a/gdk/quartz/gdkwindow-quartz.c +++ b/gdk/quartz/gdkwindow-quartz.c @@ -2623,6 +2623,9 @@ gdk_window_set_decorations (GdkWindow *window, backing:NSBackingStoreBuffered defer:NO]; + [impl->toplevel setHasShadow: window_type_hint_to_shadow (impl->type_hint)]; + [impl->toplevel setLevel: window_type_hint_to_level (impl->type_hint)]; + [impl->toplevel setContentView:old_view]; [impl->toplevel setFrame:rect display:YES]; }