diff options
author | derat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-09 17:28:34 +0000 |
---|---|---|
committer | derat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-09 17:28:34 +0000 |
commit | 539ad94fbc9ccd48bbc30d53db332eb31623821d (patch) | |
tree | 977b503fd3bf172641c692aa46a144244682df26 /views/window | |
parent | e29298e41eb9d9b2c25e852280749771c6361a80 (diff) | |
download | chromium_src-539ad94fbc9ccd48bbc30d53db332eb31623821d.zip chromium_src-539ad94fbc9ccd48bbc30d53db332eb31623821d.tar.gz chromium_src-539ad94fbc9ccd48bbc30d53db332eb31623821d.tar.bz2 |
views: Make WindowGtk set transient-for hint before mapping.
Otherwise, there's a race as to whether the hint will be
set when the window manager handles the window's MapNotify
event. (The Chrome OS window manager currently ignores any
attempts by clients to change transient-for hints on windows
that have already been mapped, for instance.)
BUG=chromium-os:1587
TEST=seems to work
Review URL: http://codereview.chromium.org/686001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@41036 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/window')
-rw-r--r-- | views/window/window_gtk.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/views/window/window_gtk.cc b/views/window/window_gtk.cc index 5fb2bd6..472c0bf 100644 --- a/views/window/window_gtk.cc +++ b/views/window/window_gtk.cc @@ -371,15 +371,15 @@ WindowGtk::WindowGtk(WindowDelegate* window_delegate) } void WindowGtk::Init(GtkWindow* parent, const gfx::Rect& bounds) { - WidgetGtk::Init(NULL, bounds); + if (parent) + make_transient_to_parent(); + WidgetGtk::Init(GTK_WIDGET(parent), bounds); // We call this after initializing our members since our implementations of // assorted WidgetWin functions may be called during initialization. is_modal_ = window_delegate_->IsModal(); if (is_modal_) gtk_window_set_modal(GetNativeWindow(), true); - if (parent) - gtk_window_set_transient_for(GetNativeWindow(), parent); g_signal_connect(G_OBJECT(GetNativeWindow()), "configure-event", G_CALLBACK(CallConfigureEvent), this); |