~vanvugt/unity/fix-865006

« back to all changes in this revision

Viewing changes to hud/HudView.cpp

  • Committer: Andrea Azzarone
  • Date: 2012-06-12 08:23:23 UTC
  • mfrom: (2400 unity)
  • mto: This revision was merged to the branch mainline in revision 2404.
  • Revision ID: azzaronea@gmail.com-20120612082323-zdw8jxwjcia8vi71
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
 
58
58
View::View()
59
59
  : AbstractView()
60
 
  , button_views_(NULL)
61
 
  , timeline_id_(0)
 
60
  , button_views_(nullptr)
62
61
  , start_time_(0)
63
62
  , last_known_height_(0)
64
63
  , current_height_(0)
121
120
  {
122
121
    RemoveChild((*button).GetPointer());
123
122
  }
124
 
 
125
 
  if (timeline_id_)
126
 
    g_source_remove(timeline_id_);
127
123
}
128
124
 
129
125
void View::ProcessGrowShrink()
473
469
 
474
470
  renderer_.DrawInnerCleanup(gfx_context, draw_content_geo, absolute_window_geometry_, window_geometry_);
475
471
 
476
 
  if (timeline_need_more_draw_ && !timeline_id_)
 
472
  if (timeline_need_more_draw_ && !timeline_idle_)
477
473
  {
478
 
    timeline_id_ = g_idle_add([] (gpointer data) -> gboolean
479
 
    {
480
 
      View *self = static_cast<View*>(data);
481
 
      self->QueueDraw();
482
 
      self->timeline_id_ = 0;
483
 
      return FALSE;
484
 
    }, this);
 
474
    timeline_idle_.reset(new glib::Idle([&] () {
 
475
      QueueDraw();
 
476
      timeline_idle_.reset();
 
477
      return false;
 
478
    }));
485
479
  }
486
480
}
487
481
 
686
680
 
687
681
}
688
682
}
 
683