summaryrefslogtreecommitdiffstats
path: root/views/widget/widget_gtk.h
diff options
context:
space:
mode:
Diffstat (limited to 'views/widget/widget_gtk.h')
-rw-r--r--views/widget/widget_gtk.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/views/widget/widget_gtk.h b/views/widget/widget_gtk.h
index ccd3bd5..e082eea 100644
--- a/views/widget/widget_gtk.h
+++ b/views/widget/widget_gtk.h
@@ -8,6 +8,7 @@
#include <gtk/gtk.h>
#include "app/active_window_watcher_x.h"
+#include "base/gfx/size.h"
#include "base/message_loop.h"
#include "views/focus/focus_manager.h"
#include "views/widget/widget.h"
@@ -413,6 +414,12 @@ class WidgetGtk
// See make_transient_to_parent for a description.
bool transient_to_parent_;
+ // Last size supplied to OnSizeAllocate. We cache this as any time the
+ // size of a GtkWidget changes size_allocate is called, even if the size
+ // didn't change. If we didn't cache this and ignore calls when the size
+ // hasn't changed, we can end up getting stuck in a never ending loop.
+ gfx::Size size_;
+
DISALLOW_COPY_AND_ASSIGN(WidgetGtk);
};