| 427 | } |
| 428 | |
| 429 | bool AbstractScreenGrabber::eventFilter(QObject *object, QEvent *event) |
| 430 | { |
| 431 | if (event->type() == QEvent::Type::Expose) { |
| 432 | // If the window is no longer rendering, clear the image so the unavailable text is shown again. |
| 433 | // Otherwise, the viewport is frozen on the last grabbed frame - and it never actually updates when the user interacts with it. |
| 434 | if (!m_window->isExposed()) { |
| 435 | m_grabbedFrame.image = QImage(); |
| 436 | emit sceneGrabbed(m_grabbedFrame); |
| 437 | } |
| 438 | } |
| 439 | return QObject::eventFilter(object, event); |
| 440 | } |
| 441 | |
| 442 | void AbstractScreenGrabber::gatherRenderInfo() |
| 443 | { |