Commit 3e5fc571 authored by Chong Yidong's avatar Chong Yidong

(x_wm_set_size_hint): Return immediately if called during

initialization.
parent 90503d96
......@@ -934,8 +934,12 @@ x_wm_set_size_hint (f, flags, user_position)
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 @@ x_wm_set_size_hint (f, flags, user_position)
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 @@ x_wm_set_size_hint (f, flags, user_position)
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.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment