diff options
author | Richard Hult <richard@imendio.com> | 2007-06-16 15:38:33 +0000 |
---|---|---|
committer | Richard Hult <rhult@src.gnome.org> | 2007-06-16 15:38:33 +0000 |
commit | f55096fc74687f20cc6c15b88677436f12b500de (patch) | |
tree | 411a8495518c65637047b5f7e06fec6d0ee7621f | |
parent | 517012e987f320ea0405fe8ea9e724e0c112476d (diff) | |
download | gtk+-f55096fc74687f20cc6c15b88677436f12b500de.tar.gz |
Don't set parent/child relationship for tooltip windows since that moves
2007-06-16 Richard Hult <richard@imendio.com>
* gdk/quartz/gdkwindow-quartz.c (gdk_window_set_transient_for):
Don't set parent/child relationship for tooltip windows since that
moves the parent window to the front, due to the tooltip having a
high window level.
svn path=/trunk/; revision=18158
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | gdk/quartz/gdkwindow-quartz.c | 13 |
2 files changed, 18 insertions, 2 deletions
@@ -1,3 +1,10 @@ +2007-06-16 Richard Hult <richard@imendio.com> + + * gdk/quartz/gdkwindow-quartz.c (gdk_window_set_transient_for): + Don't set parent/child relationship for tooltip windows since that + moves the parent window to the front, due to the tooltip having a + high window level. + 2007-06-16 Christian Persch <chpe@gnome.org> * gtk/gtkbuilder.c: (gtk_builder_real_get_type_from_name), diff --git a/gdk/quartz/gdkwindow-quartz.c b/gdk/quartz/gdkwindow-quartz.c index e7c066a02c..5329ff0cf1 100644 --- a/gdk/quartz/gdkwindow-quartz.c +++ b/gdk/quartz/gdkwindow-quartz.c @@ -1576,8 +1576,17 @@ gdk_window_set_transient_for (GdkWindow *window, /* We save the parent because it needs to be unset/reset when * hiding and showing the window. */ - window_impl->transient_for = g_object_ref (parent); - [parent_impl->toplevel addChildWindow:window_impl->toplevel ordered:NSWindowAbove]; + + /* We don't set transients for tooltips, they are already + * handled by the window level being the top one. If we do, then + * the parent window will be brought to the top just because the + * tooltip is, which is not what we want. + */ + if (gdk_window_get_type_hint (window) != GDK_WINDOW_TYPE_HINT_TOOLTIP) + { + window_impl->transient_for = g_object_ref (parent); + [parent_impl->toplevel addChildWindow:window_impl->toplevel ordered:NSWindowAbove]; + } } GDK_QUARTZ_RELEASE_POOL; |