// We keep running until we go a full interval without any updates,
// or there are no active clients anymore
- if (comparer->is_empty() || !desktopStarted) {
+ if (!desktopStarted ||
+ ((comparer != NULL) && comparer->is_empty())) {
// Unless something waits for us to advance the frame count
if (queuedMsc < msc)
return;
frameTimer.repeat(timeout);
- if (!comparer->is_empty() && desktopStarted)
+ if (desktopStarted &&
+ ((comparer != NULL) && !comparer->is_empty()))
writeUpdate();
msc++;
desktopStarted = true;
// The tracker might have accumulated changes whilst we were
// stopped, so flush those out
+ assert(comparer != NULL);
if (!comparer->is_empty())
writeUpdate();
// If the frame clock is running, then it will be running slowly,
return;
// Anyone actually interested in frames?
- if (comparer->is_empty() && (queuedMsc <= msc))
- return;
+ if (!desktopStarted ||
+ ((comparer != NULL) && comparer->is_empty())) {
+ if (queuedMsc < msc)
+ return;
+ }
// Run the frame clock very slowly if there are no clients to actually
// send updates to
assert(blockCounter == 0);
assert(desktopStarted);
+ assert(comparer != NULL);
comparer->getUpdateInfo(&ui, pb->getRect());
toCheck = ui.changed.union_(ui.copied);
if (blockCounter > 0)
return pb->getRect();
+ assert(comparer != NULL);
+
// Block client from updating if there are pending updates
if (comparer->is_empty())
return Region();