Mercurial > emacs
comparison src/gtkutil.c @ 90601:a1a25ac6c88a
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 427-436)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 134-136)
- Merge from emacs--devo--0
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-110
author | Miles Bader <miles@gnu.org> |
---|---|
date | Thu, 14 Sep 2006 09:24:00 +0000 |
parents | c358d0861b16 ab6be05ddfb1 |
children | b5c13d1564a9 |
comparison
equal
deleted
inserted
replaced
90600:84dd84b43e1b | 90601:a1a25ac6c88a |
---|---|
129 xg_display_close (Display *dpy) | 129 xg_display_close (Display *dpy) |
130 { | 130 { |
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; |
145 Display *new_dpy = 0; | 139 Display *new_dpy = 0; |
146 GdkDisplay *gdpy_new; | 140 GdkDisplay *gdpy_new; |
158 gdpy_new = gdk_x11_lookup_xdisplay (new_dpy); | 152 gdpy_new = gdk_x11_lookup_xdisplay (new_dpy); |
159 gdk_display_manager_set_default_display (gdk_display_manager_get (), | 153 gdk_display_manager_set_default_display (gdk_display_manager_get (), |
160 gdpy_new); | 154 gdpy_new); |
161 } | 155 } |
162 | 156 |
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. */ | |
160 | |
161 #if GTK_MAJOR_VERSION == 2 && GTK_MINOR_VERSION < 10 | |
163 g_object_run_dispose (G_OBJECT (gdpy)); | 162 g_object_run_dispose (G_OBJECT (gdpy)); |
164 | |
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 */ |
170 } | 168 } |
171 | 169 |