|
|
@@ -412,15 +412,38 @@ is_active() const {
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- CDReader cdata(_cycler);
|
|
|
+ CDLockedReader cdata(_cycler);
|
|
|
+ if (!cdata->_active) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
if (cdata->_one_shot_frame != -1) {
|
|
|
// If one_shot is in effect, then we are active only for the one indicated
|
|
|
// frame.
|
|
|
if (cdata->_one_shot_frame != ClockObject::get_global_clock()->get_frame_count()) {
|
|
|
return false;
|
|
|
+ } else {
|
|
|
+ return true;
|
|
|
}
|
|
|
}
|
|
|
- return cdata->_active;
|
|
|
+
|
|
|
+ // If the window has a clear value set, it is active.
|
|
|
+ if (is_any_clear_active()) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ // If we triggered a copy operation, it is also active.
|
|
|
+ if (_trigger_copy) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ // The window is active if at least one display region is active.
|
|
|
+ if (cdata->_active_display_regions_stale) {
|
|
|
+ CDWriter cdataw(((GraphicsOutput *)this)->_cycler, cdata, false);
|
|
|
+ ((GraphicsOutput *)this)->do_determine_display_regions(cdataw);
|
|
|
+ }
|
|
|
+
|
|
|
+ return !cdata->_active_display_regions.empty();
|
|
|
}
|
|
|
|
|
|
/**
|