diff --git a/gdk/x11/gdkscreen-x11.c b/gdk/x11/gdkscreen-x11.c index 8555dd3add..59d4a27b50 100644 --- a/gdk/x11/gdkscreen-x11.c +++ b/gdk/x11/gdkscreen-x11.c @@ -129,7 +129,6 @@ gdk_x11_screen_finalize (GObject *object) for (i = 0; i < x11_screen->nvisuals; i++) g_object_unref (x11_screen->visuals[i]); g_free (x11_screen->visuals); - g_hash_table_destroy (x11_screen->visual_hash); g_free (x11_screen->window_manager_name); diff --git a/gdk/x11/gdkscreen-x11.h b/gdk/x11/gdkscreen-x11.h index 67cdd531d8..ee099b54f4 100644 --- a/gdk/x11/gdkscreen-x11.h +++ b/gdk/x11/gdkscreen-x11.h @@ -83,7 +83,6 @@ struct _GdkX11Screen GdkVisualType available_types[6]; gint16 navailable_depths; gint16 navailable_types; - GHashTable *visual_hash; GdkVisual *rgba_visual; /* cache for window->translate vfunc */ diff --git a/gdk/x11/gdkvisual-x11.c b/gdk/x11/gdkvisual-x11.c index d9df8e33c6..b9486132e9 100644 --- a/gdk/x11/gdkvisual-x11.c +++ b/gdk/x11/gdkvisual-x11.c @@ -44,12 +44,6 @@ struct _GdkX11VisualClass GdkVisualClass visual_class; }; -static void gdk_visual_add (GdkVisual *visual); -static guint gdk_visual_hash (Visual *key); -static gboolean gdk_visual_equal (Visual *a, - Visual *b); - - G_DEFINE_TYPE (GdkX11Visual, gdk_x11_visual, GDK_TYPE_VISUAL) static void @@ -294,9 +288,6 @@ _gdk_x11_screen_init_visuals (GdkScreen *screen) } } - for (i = 0; i < nvisuals; i++) - gdk_visual_add (visuals[i]); - if (x11_screen->navailable_types == 0) g_error ("unable to find a usable visual type"); @@ -363,31 +354,6 @@ gdk_x11_screen_lookup_visual (GdkScreen *screen, return NULL; } -static void -gdk_visual_add (GdkVisual *visual) -{ - GdkX11Screen *x11_screen = GDK_X11_SCREEN (visual->screen); - - if (!x11_screen->visual_hash) - x11_screen->visual_hash = g_hash_table_new ((GHashFunc) gdk_visual_hash, - (GEqualFunc) gdk_visual_equal); - - g_hash_table_insert (x11_screen->visual_hash, GDK_X11_VISUAL (visual)->xvisual, visual); -} - -static guint -gdk_visual_hash (Visual *key) -{ - return key->visualid; -} - -static gboolean -gdk_visual_equal (Visual *a, - Visual *b) -{ - return (a->visualid == b->visualid); -} - /** * _gdk_visual_get_x11_colormap: * @visual: the visual to get the colormap from