]> Pileus Git - ~andy/gtk/commitdiff
Always set success to TRUE. (gdk_color_change): Implement.
authorRichard Hult <richard@imendio.com>
Sat, 29 Jul 2006 11:05:15 +0000 (11:05 +0000)
committerRichard Hult <rhult@src.gnome.org>
Sat, 29 Jul 2006 11:05:15 +0000 (11:05 +0000)
2006-07-29  Richard Hult  <richard@imendio.com>

* gdk/quartz/gdkcolor-quartz.c (gdk_colormap_alloc_colors): Always
set success to TRUE.
(gdk_color_change): Implement.

* gdk/quartz/GdkQuartzWindow.c
([GdkQuartzWindow -canBecomeKeyWindow]): Add comment.

* gdk/quartz/gdkevents-quartz.c (gdk_screen_get_setting): Make the
default font a bit smaller until we have made this get the system
setting.

* gdk/quartz/gdkwindow-quartz.c (gdk_window_set_type_hint): Enable
shadows for the right window types.

* gdk/quartz/gdkprivate-quartz.h:
* gdk/quartz/gdkgc-quartz.c:
* gdk/quartz/gdkdrawable-quartz.c:
* gdk/quartz/gdkcolor-quartz.c: Expose the CGContext functions,
update callers.

* gdk/quartz/gdkmain-quartz.c: (_gdk_windowing_init): No need to
get the current process ID, use the right constant instead.

ChangeLog
ChangeLog.pre-2-10
gdk/quartz/GdkQuartzWindow.c
gdk/quartz/gdkcolor-quartz.c
gdk/quartz/gdkdrawable-quartz.c
gdk/quartz/gdkdrawable-quartz.h
gdk/quartz/gdkevents-quartz.c
gdk/quartz/gdkgc-quartz.c
gdk/quartz/gdkmain-quartz.c
gdk/quartz/gdkprivate-quartz.h
gdk/quartz/gdkwindow-quartz.c

index 8af5d2b5f6dc59065591f59cf9a43962358c2391..cf4ded3165a6dde8d17ec215aa4554f0f2f519b4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,28 @@
+2006-07-29  Richard Hult  <richard@imendio.com>
+
+       * gdk/quartz/gdkcolor-quartz.c (gdk_colormap_alloc_colors): Always
+       set success to TRUE.
+       (gdk_color_change): Implement.
+
+       * gdk/quartz/GdkQuartzWindow.c
+       ([GdkQuartzWindow -canBecomeKeyWindow]): Add comment.
+
+       * gdk/quartz/gdkevents-quartz.c (gdk_screen_get_setting): Make the
+       default font a bit smaller until we have made this get the system
+       setting.
+
+       * gdk/quartz/gdkwindow-quartz.c (gdk_window_set_type_hint): Enable
+       shadows for the right window types.
+
+       * gdk/quartz/gdkprivate-quartz.h:
+       * gdk/quartz/gdkgc-quartz.c:
+       * gdk/quartz/gdkdrawable-quartz.c:
+       * gdk/quartz/gdkcolor-quartz.c: Expose the CGContext functions,
+       update callers.
+
+       * gdk/quartz/gdkmain-quartz.c: (_gdk_windowing_init): No need to
+       get the current process ID, use the right constant instead.
+
 2006-07-28  Emmanuele Bassi  <ebassi@gnome.org>
 
        * gtk/gtkrecentmanager.c (gtk_recent_manager_init): Add the
index 8af5d2b5f6dc59065591f59cf9a43962358c2391..cf4ded3165a6dde8d17ec215aa4554f0f2f519b4 100644 (file)
@@ -1,3 +1,28 @@
+2006-07-29  Richard Hult  <richard@imendio.com>
+
+       * gdk/quartz/gdkcolor-quartz.c (gdk_colormap_alloc_colors): Always
+       set success to TRUE.
+       (gdk_color_change): Implement.
+
+       * gdk/quartz/GdkQuartzWindow.c
+       ([GdkQuartzWindow -canBecomeKeyWindow]): Add comment.
+
+       * gdk/quartz/gdkevents-quartz.c (gdk_screen_get_setting): Make the
+       default font a bit smaller until we have made this get the system
+       setting.
+
+       * gdk/quartz/gdkwindow-quartz.c (gdk_window_set_type_hint): Enable
+       shadows for the right window types.
+
+       * gdk/quartz/gdkprivate-quartz.h:
+       * gdk/quartz/gdkgc-quartz.c:
+       * gdk/quartz/gdkdrawable-quartz.c:
+       * gdk/quartz/gdkcolor-quartz.c: Expose the CGContext functions,
+       update callers.
+
+       * gdk/quartz/gdkmain-quartz.c: (_gdk_windowing_init): No need to
+       get the current process ID, use the right constant instead.
+
 2006-07-28  Emmanuele Bassi  <ebassi@gnome.org>
 
        * gtk/gtkrecentmanager.c (gtk_recent_manager_init): Add the
index 6091e7a0b41079dfc06bf3baa2d0ec2eb45ecaa1..e50fddf2fe7d1de00c3c169106a4fc22184c143f 100644 (file)
   GdkWindowObject *private = (GdkWindowObject *)window;
   GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (private->impl);
 
+  /* FIXME: Is this right? If so, the switch shouldn't be needed. Need
+   * this + some tweaking to the event/grab code to get menus
+   * working...
+   */
+  /*if (private->window_type == GDK_WINDOW_TEMP)
+    return NO;
+  */
+
   switch (impl->type_hint)
     {
     case GDK_WINDOW_TYPE_HINT_NORMAL:
index bc1d20097131d5d058dbad6dcc67a554f6d6f831..07e726c4d08bf912a5b4b30e5cbe00d38db321be 100644 (file)
@@ -140,6 +140,9 @@ gdk_colormap_alloc_colors (GdkColormap *colormap,
                        ((colors[i].blue >> 8) & 0xff);
     }
 
+  if (success)
+    *success = TRUE;
+
   return ncolors;
 }
 
@@ -167,7 +170,7 @@ gdk_colormap_get_screen (GdkColormap *cmap)
 }
 
 void
-_gdk_quartz_set_context_fill_color_from_pixel (CGContextRef context, GdkColormap *colormap, guint32 pixel)
+gdk_quartz_set_context_fill_color_from_pixel (CGContextRef context, GdkColormap *colormap, guint32 pixel)
 {
   float red, green, blue, alpha;
 
@@ -184,7 +187,7 @@ _gdk_quartz_set_context_fill_color_from_pixel (CGContextRef context, GdkColormap
 }
 
 void
-_gdk_quartz_set_context_stroke_color_from_pixel (CGContextRef context, GdkColormap *colormap, guint32 pixel)
+gdk_quartz_set_context_stroke_color_from_pixel (CGContextRef context, GdkColormap *colormap, guint32 pixel)
 {
   float red, green, blue, alpha;
 
@@ -204,7 +207,9 @@ gboolean
 gdk_color_change (GdkColormap *colormap,
                  GdkColor    *color)
 {
-  /* FIXME: Implement */
-  return FALSE;
+  if (color->pixel < 0 || color->pixel >= colormap->size)
+    return FALSE;
+
+  return TRUE;
 }
 
index 75c17b6796049d46136bc8bd9d242b78cff4296a..11d49734978354133ab4ddf4d8072dcc0b418a7f 100644 (file)
@@ -37,7 +37,7 @@ surface_info_destroy (void *data)
 {
   SurfaceInfo *info = data;
 
-  _gdk_quartz_drawable_release_context (info->drawable, info->context);
+  gdk_quartz_drawable_release_context (info->drawable, info->context);
 
   g_free (info);
 }
@@ -55,7 +55,7 @@ gdk_quartz_ref_cairo_surface (GdkDrawable *drawable)
       GDK_WINDOW_DESTROYED (impl->wrapper))
     return NULL;
 
-  context = _gdk_quartz_drawable_get_context (drawable, TRUE);
+  context = gdk_quartz_drawable_get_context (drawable, TRUE);
   if (!context)
     return NULL;
 
@@ -123,28 +123,28 @@ gdk_quartz_draw_rectangle (GdkDrawable *drawable,
                          gint         width,
                          gint         height)
 {
-  CGContextRef context = _gdk_quartz_drawable_get_context (drawable, FALSE);
+  CGContextRef context = gdk_quartz_drawable_get_context (drawable, FALSE);
   CGRect rect = CGRectMake (x + 0.5, y + 0.5, width, height);
 
   if (!context)
     return;
 
-  _gdk_quartz_update_context_from_gc (context, gc);
+  gdk_quartz_update_context_from_gc (context, gc);
 
   if (filled)
     {
-      _gdk_quartz_set_context_fill_color_from_pixel (context, gdk_drawable_get_colormap (drawable),
+      gdk_quartz_set_context_fill_color_from_pixel (context, gdk_drawable_get_colormap (drawable),
                                                    _gdk_gc_get_fg_pixel (gc));
       CGContextFillRect (context, rect);
     }
   else
     {
-      _gdk_quartz_set_context_stroke_color_from_pixel (context, gdk_drawable_get_colormap (drawable),
+      gdk_quartz_set_context_stroke_color_from_pixel (context, gdk_drawable_get_colormap (drawable),
                                                      _gdk_gc_get_fg_pixel (gc));
       CGContextStrokeRect (context, rect);
     }
 
-  _gdk_quartz_drawable_release_context (drawable, context);
+  gdk_quartz_drawable_release_context (drawable, context);
 }
 
 static void
@@ -158,13 +158,13 @@ gdk_quartz_draw_arc (GdkDrawable *drawable,
                    gint         angle1,
                    gint         angle2)
 {
-  CGContextRef context = _gdk_quartz_drawable_get_context (drawable, FALSE);
+  CGContextRef context = gdk_quartz_drawable_get_context (drawable, FALSE);
   float start_angle, end_angle;
 
   if (!context)
     return;
 
-  _gdk_quartz_update_context_from_gc (context, gc);
+  gdk_quartz_update_context_from_gc (context, gc);
 
   CGContextSaveGState (context);
 
@@ -177,7 +177,7 @@ gdk_quartz_draw_arc (GdkDrawable *drawable,
 
   if (filled)
     {
-      _gdk_quartz_set_context_fill_color_from_pixel (context, gdk_drawable_get_colormap (drawable),
+      gdk_quartz_set_context_fill_color_from_pixel (context, gdk_drawable_get_colormap (drawable),
                                                     _gdk_gc_get_fg_pixel (gc));
 
       CGContextMoveToPoint (context, 0, 0);
@@ -189,7 +189,7 @@ gdk_quartz_draw_arc (GdkDrawable *drawable,
     }
   else
     {
-      _gdk_quartz_set_context_stroke_color_from_pixel (context, gdk_drawable_get_colormap (drawable),
+      gdk_quartz_set_context_stroke_color_from_pixel (context, gdk_drawable_get_colormap (drawable),
                                                      _gdk_gc_get_fg_pixel (gc));
       CGContextAddArc (context, 0, 0, width / 2,
                       start_angle, end_angle,
@@ -199,7 +199,7 @@ gdk_quartz_draw_arc (GdkDrawable *drawable,
 
   CGContextRestoreGState (context);
 
-  _gdk_quartz_drawable_release_context (drawable, context);
+  gdk_quartz_drawable_release_context (drawable, context);
 }
 
 static void
@@ -209,19 +209,19 @@ gdk_quartz_draw_polygon (GdkDrawable *drawable,
                         GdkPoint    *points,
                         gint         npoints)
 {
-  CGContextRef context = _gdk_quartz_drawable_get_context (drawable, FALSE);
+  CGContextRef context = gdk_quartz_drawable_get_context (drawable, FALSE);
   int i;
 
   if (!context)
     return;
 
-  _gdk_quartz_update_context_from_gc (context, gc);
+  gdk_quartz_update_context_from_gc (context, gc);
 
   if (filled)
-    _gdk_quartz_set_context_fill_color_from_pixel (context, gdk_drawable_get_colormap (drawable),
+    gdk_quartz_set_context_fill_color_from_pixel (context, gdk_drawable_get_colormap (drawable),
                                                   _gdk_gc_get_fg_pixel (gc));
   else
-    _gdk_quartz_set_context_stroke_color_from_pixel (context, gdk_drawable_get_colormap (drawable),
+    gdk_quartz_set_context_stroke_color_from_pixel (context, gdk_drawable_get_colormap (drawable),
                                                     _gdk_gc_get_fg_pixel (gc));
 
   CGContextMoveToPoint (context, points[0].x + 0.5, points[0].y + 0.5);
@@ -235,7 +235,7 @@ gdk_quartz_draw_polygon (GdkDrawable *drawable,
   else
     CGContextStrokePath (context);
 
-  _gdk_quartz_drawable_release_context (drawable, context);
+  gdk_quartz_drawable_release_context (drawable, context);
 }
 
 static void
@@ -296,12 +296,12 @@ gdk_quartz_draw_drawable (GdkDrawable *drawable,
     }
   else if (dest_depth != 0 && src_depth == dest_depth)
     {
-      CGContextRef context = _gdk_quartz_drawable_get_context (drawable, FALSE);
+      CGContextRef context = gdk_quartz_drawable_get_context (drawable, FALSE);
 
       if (!context)
        return;
 
-      _gdk_quartz_update_context_from_gc (context, gc);
+      gdk_quartz_update_context_from_gc (context, gc);
 
       CGContextSetBlendMode (context, kCGBlendModeNormal);
 
@@ -312,7 +312,7 @@ gdk_quartz_draw_drawable (GdkDrawable *drawable,
                                              GDK_PIXMAP_IMPL_QUARTZ (src_impl)->height), 
                          GDK_PIXMAP_IMPL_QUARTZ (src_impl)->image);
 
-      _gdk_quartz_drawable_release_context (drawable, context);
+      gdk_quartz_drawable_release_context (drawable, context);
     }
   else
     g_warning ("Attempt to draw a drawable with depth %d to a drawable with depth %d",
@@ -342,14 +342,14 @@ gdk_quartz_draw_segments (GdkDrawable    *drawable,
                         GdkSegment     *segs,
                         gint            nsegs)
 {
-  CGContextRef context = _gdk_quartz_drawable_get_context (drawable, FALSE);
+  CGContextRef context = gdk_quartz_drawable_get_context (drawable, FALSE);
   int i;
 
   if (!context)
     return;
 
-  _gdk_quartz_update_context_from_gc (context, gc);
-  _gdk_quartz_set_context_stroke_color_from_pixel (context, gdk_drawable_get_colormap (drawable),
+  gdk_quartz_update_context_from_gc (context, gc);
+  gdk_quartz_set_context_stroke_color_from_pixel (context, gdk_drawable_get_colormap (drawable),
                                                  _gdk_gc_get_fg_pixel (gc));
 
   for (i = 0; i < nsegs; i++)
@@ -360,7 +360,7 @@ gdk_quartz_draw_segments (GdkDrawable    *drawable,
   
   CGContextStrokePath (context);
 
-  _gdk_quartz_drawable_release_context (drawable, context);
+  gdk_quartz_drawable_release_context (drawable, context);
 }
 
 static void
@@ -369,15 +369,15 @@ gdk_quartz_draw_lines (GdkDrawable *drawable,
                       GdkPoint    *points,
                       gint         npoints)
 {
-  CGContextRef context = _gdk_quartz_drawable_get_context (drawable, FALSE);
+  CGContextRef context = gdk_quartz_drawable_get_context (drawable, FALSE);
   int i;
 
   if (!context)
     return;
 
-  _gdk_quartz_update_context_from_gc (context, gc);
-  _gdk_quartz_set_context_stroke_color_from_pixel (context, gdk_drawable_get_colormap (drawable),
-                                                  _gdk_gc_get_fg_pixel (gc));
+  gdk_quartz_update_context_from_gc (context, gc);
+  gdk_quartz_set_context_stroke_color_from_pixel (context, gdk_drawable_get_colormap (drawable),
+                                                 _gdk_gc_get_fg_pixel (gc));
   
   for (i = 1; i < npoints; i++)
     {
@@ -387,7 +387,7 @@ gdk_quartz_draw_lines (GdkDrawable *drawable,
   
   CGContextStrokePath (context);
 
-  _gdk_quartz_drawable_release_context (drawable, context);
+  gdk_quartz_drawable_release_context (drawable, context);
 }
 
 static void
@@ -404,7 +404,7 @@ gdk_quartz_draw_pixbuf (GdkDrawable     *drawable,
                       gint             x_dither,
                       gint             y_dither)
 {
-  CGContextRef context = _gdk_quartz_drawable_get_context (drawable, FALSE);
+  CGContextRef context = gdk_quartz_drawable_get_context (drawable, FALSE);
   CGColorSpaceRef colorspace;
   CGDataProviderRef data_provider;
   CGImageRef image;
@@ -435,7 +435,7 @@ gdk_quartz_draw_pixbuf (GdkDrawable     *drawable,
   CGDataProviderRelease (data_provider);
   CGColorSpaceRelease (colorspace);
 
-  _gdk_quartz_update_context_from_gc (context, gc);
+  gdk_quartz_update_context_from_gc (context, gc);
 
   CGContextSetBlendMode (context, kCGBlendModeNormal);
 
@@ -446,7 +446,7 @@ gdk_quartz_draw_pixbuf (GdkDrawable     *drawable,
   CGContextDrawImage (context, CGRectMake (0, 0, pixbuf_width, pixbuf_height), image);
   CGImageRelease (image);
 
-  _gdk_quartz_drawable_release_context (drawable, context);
+  gdk_quartz_drawable_release_context (drawable, context);
 }
 
 static void
@@ -460,7 +460,7 @@ gdk_quartz_draw_image (GdkDrawable     *drawable,
                      gint             width,
                      gint             height)
 {
-  CGContextRef context = _gdk_quartz_drawable_get_context (drawable, FALSE);
+  CGContextRef context = gdk_quartz_drawable_get_context (drawable, FALSE);
   CGColorSpaceRef colorspace;
   CGDataProviderRef data_provider;
   CGImageRef cgimage;
@@ -482,7 +482,7 @@ gdk_quartz_draw_image (GdkDrawable     *drawable,
   CGDataProviderRelease (data_provider);
   CGColorSpaceRelease (colorspace);
 
-  _gdk_quartz_update_context_from_gc (context, gc);
+  gdk_quartz_update_context_from_gc (context, gc);
 
   CGContextSetBlendMode (context, kCGBlendModeNormal);
 
@@ -493,7 +493,7 @@ gdk_quartz_draw_image (GdkDrawable     *drawable,
   CGContextDrawImage (context, CGRectMake (0, 0, image->width, image->height), cgimage);
   CGImageRelease (cgimage);
 
-  _gdk_quartz_drawable_release_context (drawable, context);
+  gdk_quartz_drawable_release_context (drawable, context);
 }
 
 static void
@@ -571,7 +571,7 @@ gdk_drawable_impl_quartz_get_type (void)
 }
 
 CGContextRef 
-_gdk_quartz_drawable_get_context (GdkDrawable *drawable, gboolean antialias)
+gdk_quartz_drawable_get_context (GdkDrawable *drawable, gboolean antialias)
 {
   if (GDK_IS_WINDOW_IMPL_QUARTZ (drawable))
     {
@@ -647,7 +647,7 @@ _gdk_quartz_drawable_get_context (GdkDrawable *drawable, gboolean antialias)
 }
 
 void
-_gdk_quartz_drawable_release_context (GdkDrawable *drawable, CGContextRef context)
+gdk_quartz_drawable_release_context (GdkDrawable *drawable, CGContextRef context)
 {
   if (!context)
     return;
index 1091b65eb54460aeca418391951dcc23e3974187..2f2f533d1a2287a5816e5ccd11bfed9820e06998 100644 (file)
@@ -54,8 +54,8 @@ struct _GdkDrawableImplQuartzClass
 
 GType gdk_drawable_impl_quartz_get_type (void);
 
-CGContextRef _gdk_quartz_drawable_get_context (GdkDrawable *drawable, gboolean antialias);
-void _gdk_quartz_drawable_release_context (GdkDrawable *drawable, CGContextRef context);
+CGContextRef gdk_quartz_drawable_get_context (GdkDrawable *drawable, gboolean antialias);
+void gdk_quartz_drawable_release_context (GdkDrawable *drawable, CGContextRef context);
 
 G_END_DECLS
 
index ee3f9a6c5650d279b8d3814e40c23a4f6e5fa6c9..4fad00b932d3adb5b9b2eb9d721ca84b9c0a967d 100644 (file)
@@ -1604,7 +1604,7 @@ gdk_screen_get_setting (GdkScreen   *screen,
   */
   if (strcmp (name, "gtk-font-name") == 0)
     {
-      g_value_set_string (value, "Lucida Grande 13");
+      g_value_set_string (value, "Lucida Grande 12");
       return TRUE;
     }
   else if (strcmp (name, "gtk-double-click-time") == 0)
index e8fd0ced5ec8eb9414335a2a3cb7015804a862b2..d18721568babc9b5aa69703e6ee79c340cef72ae 100644 (file)
@@ -209,7 +209,7 @@ gdk_gc_get_screen (GdkGC *gc)
 }
 
 void
-_gdk_quartz_update_context_from_gc (CGContextRef context, GdkGC *gc)
+gdk_quartz_update_context_from_gc (CGContextRef context, GdkGC *gc)
 {
   GdkGCQuartz *private;
 
index f454d7e147374860bcda74cc914d186a174a50f7..ff98eaee436571785409f9879c67b689f8571bf5 100644 (file)
@@ -30,12 +30,11 @@ const GOptionEntry _gdk_windowing_args[] = {
 void
 _gdk_windowing_init (void)
 {
-  ProcessSerialNumber psn;
+  ProcessSerialNumber psn = { 0, kCurrentProcess };
 
   /* Make the current process a foreground application, i.e. an app
    * with a user interface, in case we're not running from a .app bundle
    */
-  GetCurrentProcess (&psn);
   TransformProcessType (&psn, kProcessTransformToForegroundApplication);
 }
 
index 0116852333b3e47f7fdfd4ae1cc4d738bd13ca12..3f8ec8e678815848e1050da9ac0137a0ceddfd74 100644 (file)
@@ -98,10 +98,10 @@ void _gdk_events_init           (void);
 void _gdk_visual_init           (void);
 void _gdk_input_init            (void);
 
-void _gdk_quartz_set_context_fill_color_from_pixel (CGContextRef context, GdkColormap *colormap, guint32 pixel);
-void _gdk_quartz_set_context_stroke_color_from_pixel (CGContextRef context, GdkColormap *colormap, guint32 pixel);
+void gdk_quartz_set_context_fill_color_from_pixel (CGContextRef context, GdkColormap *colormap, guint32 pixel);
+void gdk_quartz_set_context_stroke_color_from_pixel (CGContextRef context, GdkColormap *colormap, guint32 pixel);
 
-void _gdk_quartz_update_context_from_gc (CGContextRef context, GdkGC *gc);
+void gdk_quartz_update_context_from_gc (CGContextRef context, GdkGC *gc);
 
 gint        _gdk_quartz_get_inverted_screen_y      (gint y);
 
index 7bed32a08b0a7e83d580175f539a8aedae78b65f..7fbd0e967c330985c9287ddb966a2084100037e1 100644 (file)
@@ -141,7 +141,7 @@ gdk_window_impl_quartz_begin_paint_region (GdkPaintable *paintable,
                                           GdkRegion    *region)
 {
   GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (paintable);
-  CGContextRef context = _gdk_quartz_drawable_get_context (GDK_DRAWABLE (impl), FALSE);
+  CGContextRef context = gdk_quartz_drawable_get_context (GDK_DRAWABLE (impl), FALSE);
   int i, n_rects;
   GdkRectangle *rects;
 
@@ -155,15 +155,15 @@ gdk_window_impl_quartz_begin_paint_region (GdkPaintable *paintable,
   gdk_region_get_rectangles (region, &rects, &n_rects);
   for (i = 0; i < n_rects; i++) 
     {
-      _gdk_quartz_set_context_fill_color_from_pixel (context, gdk_drawable_get_colormap (GDK_DRAWABLE_IMPL_QUARTZ (impl)->wrapper),
-                                                    GDK_WINDOW_OBJECT (GDK_DRAWABLE_IMPL_QUARTZ (impl)->wrapper)->bg_color.pixel);
+      gdk_quartz_set_context_fill_color_from_pixel (context, gdk_drawable_get_colormap (GDK_DRAWABLE_IMPL_QUARTZ (impl)->wrapper),
+                                                   GDK_WINDOW_OBJECT (GDK_DRAWABLE_IMPL_QUARTZ (impl)->wrapper)->bg_color.pixel);
       
       CGContextFillRect (context, CGRectMake (rects[i].x, rects[i].y, rects[i].width, rects[i].height));
       
     }
   g_free (rects);
 
-  _gdk_quartz_drawable_release_context (GDK_DRAWABLE (impl), context);
+  gdk_quartz_drawable_release_context (GDK_DRAWABLE (impl), context);
 }
 
 static void
@@ -1366,10 +1366,14 @@ gdk_window_set_type_hint (GdkWindow        *window,
     {
     case GDK_WINDOW_TYPE_HINT_NORMAL:  /* Normal toplevel window */
     case GDK_WINDOW_TYPE_HINT_DIALOG:  /* Dialog window */
+      level = NSNormalWindowLevel;
+      shadow = TRUE;
+      break;
+
     case GDK_WINDOW_TYPE_HINT_TOOLBAR: /* Window used to implement toolbars */
     case GDK_WINDOW_TYPE_HINT_DESKTOP: /* N/A */
       level = NSNormalWindowLevel;
-      shadow = TRUE;
+      shadow = FALSE;
       break;
 
     case GDK_WINDOW_TYPE_HINT_DOCK:
@@ -1416,9 +1420,7 @@ gdk_window_set_type_hint (GdkWindow        *window,
       break;
     }
 
-  /* Note: The shadow should probably be handled in a theme:
-     [impl->toplevel setHasShadow:shadow];
-  */
+  [impl->toplevel setHasShadow:shadow];
   [impl->toplevel setLevel:level];
 }