aboutsummaryrefslogtreecommitdiff
path: root/lumina-screenshot/MainUI.cpp
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2014-12-18 07:47:48 -0500
committerKen Moore <ken@pcbsd.org>2014-12-18 07:47:48 -0500
commit71c2fda95224f0a04316c5f1059628d33564ca43 (patch)
treeca74dbe49dd2f555e73893e7f5f06154d6dab763 /lumina-screenshot/MainUI.cpp
parentOops, forgot to add knowledge of the new "Wine" app category to the userbutton. (diff)
downloadlumina-71c2fda95224f0a04316c5f1059628d33564ca43.tar.gz
lumina-71c2fda95224f0a04316c5f1059628d33564ca43.tar.bz2
lumina-71c2fda95224f0a04316c5f1059628d33564ca43.zip
Commit a checkpoint on the conversion of Lumina to Qt5.
It is functional at the moment, but still has a few rough edges with regards to the X11 background interface (due to the move from XLib to XCB in Qt5). This reulst in some of the window manager interactions not behaving properly (such as sticky status on panels).
Diffstat (limited to 'lumina-screenshot/MainUI.cpp')
-rw-r--r--lumina-screenshot/MainUI.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lumina-screenshot/MainUI.cpp b/lumina-screenshot/MainUI.cpp
index 5ff698bd..9abe93a2 100644
--- a/lumina-screenshot/MainUI.cpp
+++ b/lumina-screenshot/MainUI.cpp
@@ -11,7 +11,7 @@
MainUI::MainUI() : QMainWindow(), ui(new Ui::MainUI){
ui->setupUi(this); //load the designer file
- cpic = QPixmap::grabWindow(QApplication::desktop()->winId()); //initial screenshot
+ cpic = QApplication::screens().at(0)->grabWindow(QApplication::desktop()->winId()); //initial screenshot
ppath = QDir::homePath();
QWidget *spacer = new QWidget();
spacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
@@ -90,12 +90,13 @@ bool MainUI::getWindow(){
}
void MainUI::getPixmap(){
+ QScreen *scrn = QApplication::screens().at(0);
if(cwin==0){
//Grab the whole screen
- cpic = QPixmap::grabWindow(QApplication::desktop()->winId());
+ cpic = scrn->grabWindow(QApplication::desktop()->winId());
}else{
//Grab just the designated window
- cpic = QPixmap::grabWindow(cwin);
+ cpic = scrn->grabWindow(cwin);
}
this->show();
//Now display the pixmap on the label as well
bgstack15