diff options
author | Owen Taylor <otaylor@redhat.com> | 2002-09-24 23:54:12 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2002-09-24 23:54:12 +0000 |
commit | 6a7d4ee3ae1d7c76b5b58cdfb28fdb0f461e7cda (patch) | |
tree | 5d4ad92107d17e774da3ed636831a1b1cbeff65b /gdk | |
parent | 8cc9e8cfa939aa459c0ee560c26d789f22197ad3 (diff) | |
download | gtk+-6a7d4ee3ae1d7c76b5b58cdfb28fdb0f461e7cda.tar.gz |
Look up the visual as well as the colormap, since calling
Tue Sep 24 19:45:55 2002 Owen Taylor <otaylor@redhat.com>
* gdk/x11/gdkwindow-x11.c (gdk_window_impl_x11_get_colormap):
Look up the visual as well as the colormap, since calling
gdk_drawable_get_visual() causes infinite recursion.
* gdk/x11/gdkwindow-x11.c (_gdk_windowing_window_init):
Set the colormap for the root window.
Diffstat (limited to 'gdk')
-rw-r--r-- | gdk/x11/gdkwindow-x11.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c index f76e71971a..c4368d7f6c 100644 --- a/gdk/x11/gdkwindow-x11.c +++ b/gdk/x11/gdkwindow-x11.c @@ -198,13 +198,16 @@ gdk_window_impl_x11_get_colormap (GdkDrawable *drawable) drawable_impl->colormap == NULL) { XWindowAttributes window_attributes; + GdkVisual *visual; XGetWindowAttributes (GDK_SCREEN_XDISPLAY (drawable_impl->screen), drawable_impl->xid, &window_attributes); - drawable_impl->colormap = - gdk_x11_colormap_foreign_new (gdk_drawable_get_visual (drawable), - window_attributes.colormap); + + visual = gdk_x11_screen_lookup_visual (drawable_impl->screen, + window_attributes.visual->visualid); + drawable_impl->colormap = gdk_x11_colormap_foreign_new (visual, + window_attributes.colormap); } return drawable_impl->colormap; @@ -302,9 +305,11 @@ _gdk_windowing_window_init (GdkScreen * screen) draw_impl->screen = screen; draw_impl->xid = screen_x11->xroot_window; draw_impl->wrapper = GDK_DRAWABLE (private); + draw_impl->colormap = gdk_screen_get_system_colormap (screen); private->window_type = GDK_WINDOW_ROOT; private->depth = depth; + impl->width = width; impl->height = height; |