aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gtkutil.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 89b0f8b11c6..cf6caafa942 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -131,14 +131,8 @@ xg_display_close (Display *dpy)
131#ifdef HAVE_GTK_MULTIDISPLAY 131#ifdef HAVE_GTK_MULTIDISPLAY
132 GdkDisplay *gdpy = gdk_x11_lookup_xdisplay (dpy); 132 GdkDisplay *gdpy = gdk_x11_lookup_xdisplay (dpy);
133 133
134 /* GTK 2.2 has a bug that makes gdk_display_close crash (bug
135 http://bugzilla.gnome.org/show_bug.cgi?id=85715). This way
136 we can continue running, but there will be memory leaks. */
137
138#if GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION < 4
139
140 /* If this is the default display, we must change it before calling 134 /* If this is the default display, we must change it before calling
141 dispose, otherwise it will crash. */ 135 dispose, otherwise it will crash on some Gtk+ versions. */
142 if (gdk_display_get_default () == gdpy) 136 if (gdk_display_get_default () == gdpy)
143 { 137 {
144 struct x_display_info *dpyinfo; 138 struct x_display_info *dpyinfo;
@@ -160,10 +154,14 @@ xg_display_close (Display *dpy)
160 gdpy_new); 154 gdpy_new);
161 } 155 }
162 156
163 g_object_run_dispose (G_OBJECT (gdpy)); 157 /* GTK 2.2-2.8 has a bug that makes gdk_display_close crash (bug
158 http://bugzilla.gnome.org/show_bug.cgi?id=85715). This way
159 we can continue running, but there will be memory leaks. */
164 160
161#if GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION < 10
162 g_object_run_dispose (G_OBJECT (gdpy));
165#else 163#else
166 /* I hope this will be fixed in GTK 2.4. It is what bug 85715 says. */ 164 /* This seems to be fixed in GTK 2.10. */
167 gdk_display_close (gdpy); 165 gdk_display_close (gdpy);
168#endif 166#endif
169#endif /* HAVE_GTK_MULTIDISPLAY */ 167#endif /* HAVE_GTK_MULTIDISPLAY */