summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2006-07-11 14:44:21 -0400
committerKristian Høgsberg <krh@redhat.com>2006-07-11 14:44:21 -0400
commit58617171fb0e6a31b81c7638f797ad2b7afc5d15 (patch)
treeac0e96573b167047999d0aa17cf166c646569762
parent652ea75b88a109481a7a2492a448eff9f35d5973 (diff)
Fix crash on X server without COMPOSITE.
-rw-r--r--dock.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/dock.c b/dock.c
index f759f99..fc87307 100644
--- a/dock.c
+++ b/dock.c
@@ -351,7 +351,9 @@ kiba_dock_realize (GtkWidget *widget)
attributes.visual = gdk_screen_get_rgba_visual (screen);
attributes.colormap = gdk_screen_get_rgba_colormap (screen);
attributes.event_mask = gtk_widget_get_events (widget) | GDK_EXPOSURE_MASK;
- attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
+ attributes_mask = GDK_WA_X | GDK_WA_Y;
+ if (attributes.visual != NULL && attributes.colormap != NULL)
+ attributes_mask |= GDK_WA_VISUAL | GDK_WA_COLORMAP;
widget->window = gdk_window_new (gdk_screen_get_root_window (screen),
&attributes, attributes_mask);
@@ -739,7 +741,9 @@ kiba_launcher_create_window (KibaLauncher *launcher)
GDK_POINTER_MOTION_MASK |
GDK_POINTER_MOTION_HINT_MASK;
- attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
+ attributes_mask = GDK_WA_X | GDK_WA_Y;
+ if (attributes.visual != NULL && attributes.colormap != NULL)
+ attributes_mask |= GDK_WA_VISUAL | GDK_WA_COLORMAP;
launcher->window = gdk_window_new (gdk_screen_get_root_window (screen),
&attributes, attributes_mask);