diff --git a/rviz_common/src/rviz_common/loading_dialog.cpp b/rviz_common/src/rviz_common/loading_dialog.cpp index 42c895e0d..fc10b59e3 100644 --- a/rviz_common/src/rviz_common/loading_dialog.cpp +++ b/rviz_common/src/rviz_common/loading_dialog.cpp @@ -53,7 +53,6 @@ void LoadingDialog::showMessage(const QString & message) label_->setText(message); QApplication::processEvents(); QWidget::repaint(); - QApplication::flush(); } } // namespace rviz_common diff --git a/rviz_common/src/rviz_common/screenshot_dialog.cpp b/rviz_common/src/rviz_common/screenshot_dialog.cpp index 2320943bb..f200e3370 100644 --- a/rviz_common/src/rviz_common/screenshot_dialog.cpp +++ b/rviz_common/src/rviz_common/screenshot_dialog.cpp @@ -42,8 +42,10 @@ #include // NOLINT: cpplint is unable to handle the include order here // Included so we know that QPushButton inherits QAbstractButton #include // NOLINT: cpplint is unable to handle the include order here +#include // NOLINT: cpplint is unable to handle the include order here #include // NOLINT: cpplint is unable to handle the include order here #include // NOLINT: cpplint is unable to handle the include order here +#include // NOLINT: cpplint is unable to handle the include order here #include "./scaled_image_widget.hpp" @@ -119,10 +121,11 @@ void ScreenshotDialog::onTimeout() void ScreenshotDialog::takeScreenshotNow() { + QScreen * screen = main_window_->windowHandle()->screen(); if (save_full_window_) { - screenshot_ = QPixmap::grabWindow(main_window_->winId()); + screenshot_ = screen->grabWindow(main_window_->winId()); } else { - screenshot_ = QPixmap::grabWindow(render_window_->winId()); + screenshot_ = screen->grabWindow(render_window_->winId()); } image_widget_->setImage(screenshot_); }