Commit c08bf93f authored by Alexander Larsson's avatar Alexander Larsson

Don't reset window hints when showing multiple times

gdk_window_show() should only set the initial hints on the first
run, not if the window is already mapped when gdk_window_show is
called.
parent d44d5301
......@@ -1548,7 +1548,7 @@ gdk_window_ensure_native (GdkWindow *window)
GDK_WINDOW_IMPL_GET_IFACE (private->impl)->input_shape_combine_region ((GdkWindow *)private, private->input_shape, 0, 0);
if (gdk_window_is_viewable (window))
GDK_WINDOW_IMPL_GET_IFACE (private->impl)->show (window);
GDK_WINDOW_IMPL_GET_IFACE (private->impl)->show (window, FALSE);
return TRUE;
}
......@@ -5684,7 +5684,7 @@ gdk_window_raise_internal (GdkWindow *window)
}
static void
show_all_visible_impls (GdkWindowObject *private)
show_all_visible_impls (GdkWindowObject *private, gboolean already_mapped)
{
GdkWindowObject *child;
GList *l;
......@@ -5693,11 +5693,11 @@ show_all_visible_impls (GdkWindowObject *private)
{
child = l->data;
if (GDK_WINDOW_IS_MAPPED (child))
show_all_visible_impls (child);
show_all_visible_impls (child, FALSE);
}
if (gdk_window_has_impl (private))
GDK_WINDOW_IMPL_GET_IFACE (private->impl)->show ((GdkWindow *)private);
GDK_WINDOW_IMPL_GET_IFACE (private->impl)->show ((GdkWindow *)private, already_mapped);
}
static void
......@@ -5731,7 +5731,7 @@ gdk_window_show_internal (GdkWindow *window, gboolean raise)
}
if (gdk_window_is_viewable (window))
show_all_visible_impls (private);
show_all_visible_impls (private, was_mapped);
if (!was_mapped)
{
......
......@@ -43,7 +43,8 @@ struct _GdkWindowImplIface
{
GTypeInterface g_iface;
void (* show) (GdkWindow *window);
void (* show) (GdkWindow *window,
gboolean already_mapped);
void (* hide) (GdkWindow *window);
void (* withdraw) (GdkWindow *window);
void (* raise) (GdkWindow *window);
......
......@@ -1298,7 +1298,7 @@ set_initial_hints (GdkWindow *window)
}
static void
gdk_window_x11_show (GdkWindow *window)
gdk_window_x11_show (GdkWindow *window, gboolean already_mapped)
{
GdkWindowObject *private = (GdkWindowObject*) window;
GdkDisplay *display;
......@@ -1308,8 +1308,9 @@ gdk_window_x11_show (GdkWindow *window)
Display *xdisplay = GDK_WINDOW_XDISPLAY (window);
Window xwindow = GDK_WINDOW_XID (window);
gboolean unset_bg;
set_initial_hints (window);
if (!already_mapped)
set_initial_hints (window);
if (WINDOW_IS_TOPLEVEL (window))
{
......
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