diff options
author | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-17 01:01:13 +0000 |
---|---|---|
committer | sadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-17 01:01:13 +0000 |
commit | d4ad4318ab2afee45bf082886741e86f444d9e32 (patch) | |
tree | 065d2e48f2ef0819c000cbe0dcb453d6951c1909 /views | |
parent | 17dc0dfe7eed46ec21bca5814c9bc1e23b87befc (diff) | |
download | chromium_src-d4ad4318ab2afee45bf082886741e86f444d9e32.zip chromium_src-d4ad4318ab2afee45bf082886741e86f444d9e32.tar.gz chromium_src-d4ad4318ab2afee45bf082886741e86f444d9e32.tar.bz2 |
Force an expose event from the "show" callback.
This fixes the delayed display of menus, where the menu (wrench menu, context
menus) shows up some time (sometimes 10+ seconds) after clicking.
BUG=76085
TEST=none
Review URL: http://codereview.chromium.org/6665030
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78481 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r-- | views/widget/widget_gtk.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/views/widget/widget_gtk.cc b/views/widget/widget_gtk.cc index f1594af..8b74554 100644 --- a/views/widget/widget_gtk.cc +++ b/views/widget/widget_gtk.cc @@ -1247,6 +1247,12 @@ void WidgetGtk::OnDestroy(GtkWidget* object) { } void WidgetGtk::OnShow(GtkWidget* widget) { + // Force an expose event to trigger OnPaint. This is necessary because earlier + // SchedulePaintInRect calls for the widget may have happened before the + // widget was drawable. This means that gtk_widget_queue_draw_area wasn't + // called, and so the widget will not get any expose events. Consequently, the + // widget won't paint itself until something else triggers a paint call. + gdk_window_process_updates(widget_->window, true); } void WidgetGtk::OnHide(GtkWidget* widget) { |