[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/gtkutil.c,v
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] Changes to emacs/src/gtkutil.c,v |
Date: |
Mon, 06 Oct 2008 16:17:15 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Chong Yidong <cyd> 08/10/06 16:17:15
Index: gtkutil.c
===================================================================
RCS file: /sources/emacs/emacs/src/gtkutil.c,v
retrieving revision 1.138
retrieving revision 1.139
diff -u -b -r1.138 -r1.139
--- gtkutil.c 29 Jul 2008 09:25:23 -0000 1.138
+++ gtkutil.c 6 Oct 2008 16:17:14 -0000 1.139
@@ -934,8 +934,12 @@
long flags;
int user_position;
{
- if (FRAME_GTK_OUTER_WIDGET (f))
- {
+ /* Don't set size hints during initialization; that apparently leads
+ to a race condition. See the thread at
+ http://lists.gnu.org/archive/html/emacs-devel/2008-10/msg00033.html */
+ if (NILP (Vafter_init_time) || !FRAME_GTK_OUTER_WIDGET (f))
+ return;
+
/* Must use GTK routines here, otherwise GTK resets the size hints
to its own defaults. */
GdkGeometry size_hints;
@@ -972,7 +976,6 @@
size_hints.min_width = base_width + min_cols * size_hints.width_inc;
size_hints.min_height = base_height + min_rows * size_hints.height_inc;
-
/* These currently have a one to one mapping with the X values, but I
don't think we should rely on that. */
hint_flags |= GDK_HINT_WIN_GRAVITY;
@@ -1014,17 +1017,12 @@
sizeof (size_hints)) != 0)
{
BLOCK_INPUT;
-
gtk_window_set_geometry_hints (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
- NULL,
- &size_hints,
- hint_flags);
-
+ NULL, &size_hints, hint_flags);
f->output_data.x->size_hints = size_hints;
f->output_data.x->hint_flags = hint_flags;
UNBLOCK_INPUT;
}
- }
}
/* Change background color of a frame.
- [Emacs-diffs] Changes to emacs/src/gtkutil.c,v,
Chong Yidong <=