aboutsummaryrefslogtreecommitdiff
path: root/lumina-desktop/panel-plugins
diff options
context:
space:
mode:
authorKen Moore <ken@pcbsd.org>2015-03-12 01:15:37 -0400
committerKen Moore <ken@pcbsd.org>2015-03-12 01:15:37 -0400
commit3088020d1bdfab0e192cd948212acdade865e75d (patch)
tree7d236b6b8f5f26c2058ff1676820ea36614201e5 /lumina-desktop/panel-plugins
parentAdd some debugging to the system tray image painting routine. (diff)
downloadlumina-3088020d1bdfab0e192cd948212acdade865e75d.tar.gz
lumina-3088020d1bdfab0e192cd948212acdade865e75d.tar.bz2
lumina-3088020d1bdfab0e192cd948212acdade865e75d.zip
Adjust the QPixmap::grabWindow routine to work better on Qt5 (that function was moved into QScreen)
Diffstat (limited to 'lumina-desktop/panel-plugins')
-rw-r--r--lumina-desktop/panel-plugins/systemtray/TrayIcon.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/lumina-desktop/panel-plugins/systemtray/TrayIcon.cpp b/lumina-desktop/panel-plugins/systemtray/TrayIcon.cpp
index cac49ad7..e966f389 100644
--- a/lumina-desktop/panel-plugins/systemtray/TrayIcon.cpp
+++ b/lumina-desktop/panel-plugins/systemtray/TrayIcon.cpp
@@ -14,6 +14,8 @@
//static xcb_damage_damage_t dmgID;
#include <LSession.h>
+#include <QScreen>
+
static int dmgID = 0;
TrayIcon::TrayIcon(QWidget *parent) : QWidget(parent){
@@ -121,7 +123,11 @@ void TrayIcon::paintEvent(QPaintEvent *event){
if(pix.isNull()){
//Try to grab the window directly with Qt
qDebug() << " - - Grab window directly";
- pix = QPixmap::grabWindow(AID);
+ QList<QScreen*> scrnlist = QApplication::screens();
+ for(int i=0; i<scrnlist.length(); i++){
+ pix = scrnlist[i]->grabWindow(AID);
+ break; //stop here
+ }
}
//qDebug() << " - Pix size:" << pix.size().width() << pix.size().height();
//qDebug() << " - Geom:" << this->geometry().x() << this->geometry().y() << this->geometry().width() << this->geometry().height();
bgstack15