summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
Diffstat (limited to 'views')
-rw-r--r--views/controls/menu/native_menu_gtk.cc9
-rw-r--r--views/widget/widget_gtk.cc7
-rw-r--r--views/widget/widget_gtk.h1
3 files changed, 16 insertions, 1 deletions
diff --git a/views/controls/menu/native_menu_gtk.cc b/views/controls/menu/native_menu_gtk.cc
index 7acc3a2..fbb1440 100644
--- a/views/controls/menu/native_menu_gtk.cc
+++ b/views/controls/menu/native_menu_gtk.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -308,6 +308,13 @@ void NativeMenuGtk::OnMenuHidden(GtkWidget* widget) {
}
// Quit the nested message loop we spawned in RunMenuAt.
MessageLoop::current()->Quit();
+
+ // Menu can be closed before the menu is shown.
+ if (expose_handler_id_) {
+ g_signal_handler_disconnect(menu_, expose_handler_id_);
+ expose_handler_id_ = 0;
+ }
+
menu_hidden_ = true;
}
diff --git a/views/widget/widget_gtk.cc b/views/widget/widget_gtk.cc
index 9de4fa1..6253245 100644
--- a/views/widget/widget_gtk.cc
+++ b/views/widget/widget_gtk.cc
@@ -1395,6 +1395,13 @@ gboolean WidgetGtk::OnWindowPaint(GtkWidget* widget, GdkEventExpose* event) {
// paint the root view here as that is done by OnPaint.
DCHECK(transparent_);
DrawTransparentBackground(widget, event);
+ // The Keyboard layout view has a renderer that covers the entire
+ // window, which prevents OnPaint from being called on window_contents_,
+ // so we need to remove the FREEZE_UPDATES property here.
+ if (!painted_) {
+ painted_ = true;
+ UpdateFreezeUpdatesProperty(GTK_WINDOW(widget_), false /* remove */);
+ }
return false;
}
diff --git a/views/widget/widget_gtk.h b/views/widget/widget_gtk.h
index 3217900..33c00620 100644
--- a/views/widget/widget_gtk.h
+++ b/views/widget/widget_gtk.h
@@ -303,6 +303,7 @@ class WidgetGtk : public Widget,
// Overridden from internal::InputMethodDelegate
virtual void DispatchKeyEventPostIME(const KeyEvent& key) OVERRIDE;
+ // This is called only when the window is transparent.
CHROMEGTK_CALLBACK_1(WidgetGtk, gboolean, OnWindowPaint, GdkEventExpose*);
// Returns the first ancestor of |widget| that is a window.