diff options
author | Ken Moore <moorekou@gmail.com> | 2015-07-28 14:21:48 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2015-07-28 14:21:48 -0400 |
commit | 33b2e0ec1c3810ccfac177e311fea2b03db8e47c (patch) | |
tree | 013ac6fdd53507cd97b9f7dc8698a6fdc5154bfa /lumina-desktop/LDesktop.cpp | |
parent | Just a minor update to some debugging (when turned on) for checking icons wit... (diff) | |
download | lumina-33b2e0ec1c3810ccfac177e311fea2b03db8e47c.tar.gz lumina-33b2e0ec1c3810ccfac177e311fea2b03db8e47c.tar.bz2 lumina-33b2e0ec1c3810ccfac177e311fea2b03db8e47c.zip |
Add some work that make the Lumina desktop/panels appear in the proper locations when XINERAMA is used for combining monitors. However, the interface is still completely unresponsive because the Qt backend is completely screwed up by Xinerama (returns 0's for everything related to screens, geometries, etc, preventing menus from opening up even when manually started). This might be something where we just have to say that Xinerama is not supported for Lumina (at least until lumina-wm get finished up).
Diffstat (limited to 'lumina-desktop/LDesktop.cpp')
-rw-r--r-- | lumina-desktop/LDesktop.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lumina-desktop/LDesktop.cpp b/lumina-desktop/LDesktop.cpp index 9a8c2a6b..31ac47c3 100644 --- a/lumina-desktop/LDesktop.cpp +++ b/lumina-desktop/LDesktop.cpp @@ -85,7 +85,7 @@ QRect LDesktop::availableScreenGeom(){ if(bgDesktop!=0){ return globalWorkRect; //saved from previous calculations }else{ - return desktop->screenGeometry(desktopnumber); + return LSession::handle()->screenGeom(desktopnumber); } } @@ -119,7 +119,8 @@ void LDesktop::checkResolution(){ //NOTE: This is only run the first time this desktop is created (before loading all the interface) - not on each desktop change int oldWidth = settings->value(DPREFIX+"screen/lastWidth",-1).toInt(); int oldHeight = settings->value(DPREFIX+"screen/lastHeight",-1).toInt(); - QRect scrn = LSession::desktop()->screenGeometry(desktopnumber); + QRect scrn = LSession::handle()->screenGeom(desktopnumber); + if(scrn.isNull()){ return; } issyncing = true; settings->setValue(DPREFIX+"screen/lastWidth",scrn.width()); settings->setValue(DPREFIX+"screen/lastHeight",scrn.height()); @@ -268,7 +269,7 @@ void LDesktop::InitDesktop(){ checkResolution(); //Adjust the desktop config file first (if necessary) if(DEBUG){ qDebug() << "Init Desktop:" << desktopnumber; } connect(desktop, SIGNAL(resized(int)), this, SLOT(UpdateGeometry(int))); - if(DEBUG){ qDebug() << "Desktop #"<<desktopnumber<<" -> "<< desktop->screenGeometry(desktopnumber).x() << desktop->screenGeometry(desktopnumber).y() << desktop->screenGeometry(desktopnumber).width() << desktop->screenGeometry(desktopnumber).height(); } + if(DEBUG){ qDebug() << "Desktop #"<<desktopnumber<<" -> "<< desktop->screenGeometry(desktopnumber) << LSession::handle()->screenGeom(desktopnumber); } deskMenu = new QMenu(0); connect(deskMenu, SIGNAL(triggered(QAction*)), this, SLOT(SystemApplication(QAction*)) ); winMenu = new QMenu(0); @@ -293,8 +294,8 @@ void LDesktop::InitDesktop(){ bgWindow->setContextMenuPolicy(Qt::CustomContextMenu); bgWindow->setWindowFlags(Qt::WindowStaysOnBottomHint | Qt::CustomizeWindowHint | Qt::FramelessWindowHint); LSession::handle()->XCB->SetAsDesktop(bgWindow->winId()); - bgWindow->setGeometry(desktop->screenGeometry(desktopnumber)); - connect(bgWindow, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(ShowMenu()) ); + bgWindow->setGeometry(LSession::handle()->screenGeom(desktopnumber)); + connect(bgWindow, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(ShowMenu(const QPoint&)) ); if(DEBUG){ qDebug() << "Create bgDesktop"; } bgDesktop = new QMdiArea(bgWindow); //Make sure the desktop area is transparent to show the background @@ -430,7 +431,7 @@ void LDesktop::UpdateDesktop(){ } } //Now get an accounting of all the available/used space (overwriting the private variable) - QSize ssize = desktop->screenGeometry(desktopnumber).size(); + QSize ssize = LSession::handle()->screenGeom(desktopnumber).size(); //qDebug() << "Screen Size:" << ssize << desktopnumber; if(bgDesktop->isVisible() && ( (bgDesktop->size().height() <= ssize.height()) && (bgDesktop->size().width() <= ssize.width()) )){ ssize = bgDesktop->size(); qDebug() << " - Adjusted:" << ssize; } availDPArea = QRegion(QRect(QPoint(0,0), ssize)); //Note that this is child-geometry space |