summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--views/widget/widget_gtk.cc6
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) {