[dia] [gtk-osx] GDK/Quartz does not implement gdk_colormap_new()



commit a5d646341aa75b8a8f34e90a525af15aa890001e
Author: Hans Breuer <hans breuer org>
Date:   Sun Jan 26 12:21:12 2014 +0100

    [gtk-osx] GDK/Quartz does not implement gdk_colormap_new()
    
    and Dia's can do without. For now keep the old colormap code
    for X11 and win32 although it should only be necessary for 8 bit
    color displays IIRC.

 lib/color.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/lib/color.c b/lib/color.c
index 354705a..72231d6 100644
--- a/lib/color.c
+++ b/lib/color.c
@@ -39,8 +39,13 @@ void
 color_init(void)
 {
   if (!_color_initialized) {
+#if !defined(GDK_WINDOWING_QUARTZ)
     GdkVisual *visual = gtk_widget_get_default_visual();
     colormap = gdk_colormap_new (visual, FALSE); 
+#else
+    /* gdk/quartz does not implement gdk_colormap_new () */
+    colormap = gdk_screen_get_system_colormap (gdk_screen_get_default ());
+#endif
 
     _color_initialized = TRUE;
   }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]