[gtk+/client-side-windows] Don't reset window hints when showing multiple times
- From: Alexander Larsson <alexl src gnome org>
- To: svn-commits-list gnome org
- Subject: [gtk+/client-side-windows] Don't reset window hints when showing multiple times
- Date: Tue, 16 Jun 2009 15:38:10 -0400 (EDT)
commit c08bf93fe5fd0f7192aec9ad0358da246c211e0f
Author: Alexander Larsson <alexl redhat com>
Date: Tue Jun 16 21:34:37 2009 +0200
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.
gdk/gdkwindow.c | 10 +++++-----
gdk/gdkwindowimpl.h | 3 ++-
gdk/x11/gdkwindow-x11.c | 7 ++++---
3 files changed, 11 insertions(+), 9 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 307745f..ce478b5 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -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)
{
diff --git a/gdk/gdkwindowimpl.h b/gdk/gdkwindowimpl.h
index db1c2ac..5905de8 100644
--- a/gdk/gdkwindowimpl.h
+++ b/gdk/gdkwindowimpl.h
@@ -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);
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index 291d25d..0f3ef1c 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -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))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]