aboutsummaryrefslogtreecommitdiffstats
path: root/src/gtkutil.c
diff options
context:
space:
mode:
authorJan Djärv <[email protected]>2006-09-10 12:17:19 +0000
committerJan Djärv <[email protected]>2006-09-10 12:17:19 +0000
commit9d7dda8a86aa2381f7717ab006fb45490ddc0c42 (patch)
treeac632ccd9e300467e86f711bdd27e593c8f499fb /src/gtkutil.c
parent16e4bfaf96f1dd3b4d242e96f4b1a3c95bf065af (diff)
* gtkutil.c (xg_display_close): Always change default display if needed,
check for < Gtk+ version 2.10 before calling gdk_display_close.
Diffstat (limited to 'src/gtkutil.c')
-rw-r--r--src/gtkutil.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 89b0f8b11c..cf6caafa94 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -131,14 +131,8 @@ xg_display_close (Display *dpy)
#ifdef HAVE_GTK_MULTIDISPLAY
GdkDisplay *gdpy = gdk_x11_lookup_xdisplay (dpy);
- /* GTK 2.2 has a bug that makes gdk_display_close crash (bug
- http://bugzilla.gnome.org/show_bug.cgi?id=85715). This way
- we can continue running, but there will be memory leaks. */
-
-#if GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION < 4
-
/* If this is the default display, we must change it before calling
- dispose, otherwise it will crash. */
+ dispose, otherwise it will crash on some Gtk+ versions. */
if (gdk_display_get_default () == gdpy)
{
struct x_display_info *dpyinfo;
@@ -160,10 +154,14 @@ xg_display_close (Display *dpy)
gdpy_new);
}
- g_object_run_dispose (G_OBJECT (gdpy));
+ /* GTK 2.2-2.8 has a bug that makes gdk_display_close crash (bug
+ http://bugzilla.gnome.org/show_bug.cgi?id=85715). This way
+ we can continue running, but there will be memory leaks. */
+#if GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION < 10
+ g_object_run_dispose (G_OBJECT (gdpy));
#else
- /* I hope this will be fixed in GTK 2.4. It is what bug 85715 says. */
+ /* This seems to be fixed in GTK 2.10. */
gdk_display_close (gdpy);
#endif
#endif /* HAVE_GTK_MULTIDISPLAY */