summaryrefslogtreecommitdiffstats
path: root/views
diff options
context:
space:
mode:
authoroshima@google.com <oshima@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-04 20:33:11 +0000
committeroshima@google.com <oshima@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-04 20:33:11 +0000
commite0c08be228891c1cf5c150dc6136d945585b5ea8 (patch)
tree01d87df1e56769055ebd6257dcec472107725e5d /views
parentabf9eacc6f2181c29549053ac73aa1e63882b500 (diff)
downloadchromium_src-e0c08be228891c1cf5c150dc6136d945585b5ea8.zip
chromium_src-e0c08be228891c1cf5c150dc6136d945585b5ea8.tar.gz
chromium_src-e0c08be228891c1cf5c150dc6136d945585b5ea8.tar.bz2
Fix for regressions caused by FREEZE_UPDATE property
* menu can be closed before being shown. (native_menu_gtk.cc) * virtual keyboard doesn't get expose event on window_contents_ due to renderer covering the entire area. BUG=chromium-os:13760, chromium-os:11514 TEST=refer to bugs. Review URL: http://codereview.chromium.org/6794026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80366 0039d316-1c4b-4281-b951-d872f2087c98
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.