Commit ed849d6e authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

Port kpMainWindow::slotMakeScreenshot from QDesktopWidget

grabWindow(0) is documented to "If window is 0, then the entire screen
will be grabbed."
parent 4c5ad681
Pipeline #242733 passed with stage
in 13 minutes and 25 seconds
......@@ -31,7 +31,6 @@
#include "kpMainWindowPrivate.h"
#include <QAction>
#include <QDesktopWidget>
#include <QDialog>
#include <QDialogButtonBox>
#include <QFileDialog>
......@@ -697,7 +696,7 @@ void kpMainWindow::slotScreenshot()
void kpMainWindow::slotMakeScreenshot()
{
QCoreApplication::processEvents();
QPixmap pixmap = QGuiApplication::primaryScreen()->grabWindow(QApplication::desktop()->winId());
QPixmap pixmap = QGuiApplication::primaryScreen()->grabWindow(0 /* entire screen*/);
auto *doc = new kpDocument(pixmap.width(), pixmap.height(), documentEnvironment());
doc->setImage(pixmap.toImage());
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment