~jhodapp/qtubuntu/qtubuntu_add-live-orientation

« back to all changes in this revision

Viewing changes to src/modules/application/application_image.cc

  • Committer: Tarmac
  • Author(s): Loïc Molinari, Ricardo Mendoza
  • Date: 2013-02-08 10:54:47 UTC
  • mfrom: (100.1.1 qtubuntu)
  • Revision ID: tarmac-20130208105447-xq8dlb1eza94k2k5
Added start/stop process support to application module with direct
insertion/deletion in data models.

Approved by PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
86
86
 
87
87
void ApplicationImage::scheduleUpdate() {
88
88
  DLOG("ApplicationImage::scheduleUpdate (this=%p)", this);
89
 
  if (source_ != NULL)
 
89
  if (source_ != NULL && source_->state() == Application::Running)
90
90
    ubuntu_ui_session_snapshot_running_session_with_id(source_->handle(), snapshotCallback, this);
91
91
  else
92
92
    update();
94
94
 
95
95
void ApplicationImage::paint(QPainter* painter) {
96
96
  DLOG("ApplicationImage::paint (this=%p, painter=%p)", this, painter);
97
 
  if (source_ != NULL) {
 
97
  if (source_ != NULL && source_->state() == Application::Running) {
98
98
    painter->setCompositionMode(QPainter::CompositionMode_Source);
99
99
    painter->drawImage(QRect(0, 0, width(), height()), image_, image_.rect());
100
100
  }