summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk/slide_animator_gtk.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/gtk/slide_animator_gtk.cc')
-rw-r--r--chrome/browser/gtk/slide_animator_gtk.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/chrome/browser/gtk/slide_animator_gtk.cc b/chrome/browser/gtk/slide_animator_gtk.cc
index 3cf004c..1f76457 100644
--- a/chrome/browser/gtk/slide_animator_gtk.cc
+++ b/chrome/browser/gtk/slide_animator_gtk.cc
@@ -32,7 +32,8 @@ SlideAnimatorGtk::SlideAnimatorGtk(GtkWidget* child,
: child_(child),
direction_(direction),
delegate_(delegate),
- fixed_needs_resize_(false) {
+ fixed_needs_resize_(false),
+ is_closing_(false) {
widget_.Own(gtk_fixed_new());
gtk_fixed_put(GTK_FIXED(widget_.get()), child, 0, 0);
gtk_widget_set_size_request(widget_.get(), -1, 0);
@@ -64,6 +65,7 @@ SlideAnimatorGtk::~SlideAnimatorGtk() {
}
void SlideAnimatorGtk::Open() {
+ is_closing_ = false;
gtk_widget_show_all(widget_.get());
animation_->Show();
}
@@ -84,6 +86,7 @@ void SlideAnimatorGtk::OpenWithoutAnimation() {
}
void SlideAnimatorGtk::Close() {
+ is_closing_ = true;
animation_->Hide();
}
@@ -98,6 +101,10 @@ bool SlideAnimatorGtk::IsShowing() {
return animation_->IsShowing();
}
+bool SlideAnimatorGtk::IsClosing() {
+ return animation_->IsAnimating() && is_closing_;
+}
+
void SlideAnimatorGtk::AnimationProgressed(const Animation* animation) {
int showing_height = child_->allocation.height *
animation_->GetCurrentValue();