summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Djärv <jan.h.d@swipnet.se>2011-11-27 19:33:17 +0100
committerJan Djärv <jan.h.d@swipnet.se>2011-11-27 19:33:17 +0100
commit54e9e3bf847d39b8c0daa46a999efeb6f84c9d76 (patch)
tree4cb768242a57e75c056a6172baf7455e2c47180a
parente9a452d9cd08b5e09fa7ee51d1f57bbc4a9509c0 (diff)
downloademacs-54e9e3bf847d39b8c0daa46a999efeb6f84c9d76.tar.gz
Work around an Ubuntu 11.10 bug where Emacs loops forever when started.
* configure.in: Check for gtk_window_set_has_resize_grip. * src/gtkutil.c (xg_create_frame_widgets): Call gtk_window_set_has_resize_grip (FALSE) if that function is present with Gtk+ 2.0.
-rw-r--r--ChangeLog4
-rw-r--r--configure.in4
-rw-r--r--src/ChangeLog6
-rw-r--r--src/gtkutil.c8
4 files changed, 20 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 90af2520016..63826ab942e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2011-11-27 Jan Djärv <jan.h.d@swipnet.se>
+
+ * configure.in: Check for gtk_window_set_has_resize_grip.
+
2011-11-24 Juanma Barranquero <lekktu@gmail.com>
* configure.in (HAVE_XPM): Fix typo.
diff --git a/configure.in b/configure.in
index 8b70ed59900..7a9bd0b6ee0 100644
--- a/configure.in
+++ b/configure.in
@@ -1990,8 +1990,8 @@ if test "${HAVE_GTK}" = "yes"; then
AC_CHECK_FUNCS(gtk_widget_get_window gtk_widget_set_has_window \
gtk_dialog_get_action_area gtk_widget_get_sensitive \
gtk_widget_get_mapped gtk_adjustment_get_page_size \
- gtk_orientable_set_orientation)
-
+ gtk_orientable_set_orientation \
+ gtk_window_set_has_resize_grip)
fi
dnl D-Bus has been tested under GNU/Linux only. Must be adapted for
diff --git a/src/ChangeLog b/src/ChangeLog
index dd7b715e443..5b1d5aa2f24 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
+2011-11-27 Jan Djärv <jan.h.d@swipnet.se>
+
+ * gtkutil.c (xg_create_frame_widgets): Call
+ gtk_window_set_has_resize_grip (FALSE) if that function is
+ present with Gtk+ 2.0.
+
2011-11-26 Paul Eggert <eggert@cs.ucla.edu>
* fileio.c (Finsert_file_contents): Undo previous change; see
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 7e6f5c3164d..bc71685819e 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -1100,6 +1100,14 @@ xg_create_frame_widgets (FRAME_PTR f)
else
wtop = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ /* gtk_window_set_has_resize_grip is a Gtk+ 3.0 function but Ubuntu
+ has backported it to Gtk+ 2.0 and they add the resize grip for
+ Gtk+ 2.0 applications also. But it has a bug that makes Emacs loop
+ forever, so disable the grip. */
+#if GTK_MAJOR_VERSION < 3 && defined (HAVE_GTK_WINDOW_SET_HAS_RESIZE_GRIP)
+ gtk_window_set_has_resize_grip (GTK_WINDOW (wtop), FALSE);
+#endif
+
xg_set_screen (wtop, f);
wvbox = gtk_vbox_new (FALSE, 0);