diff options
-rw-r--r-- | src-qt5/core/libLumina/RootWindow.cpp | 7 | ||||
-rw-r--r-- | src-qt5/core/lumina-desktop-unified/LSession.cpp | 4 | ||||
-rw-r--r-- | src-qt5/core/lumina-desktop-unified/main.cpp | 2 |
3 files changed, 9 insertions, 4 deletions
diff --git a/src-qt5/core/libLumina/RootWindow.cpp b/src-qt5/core/libLumina/RootWindow.cpp index fda9ca0f..90ad8739 100644 --- a/src-qt5/core/libLumina/RootWindow.cpp +++ b/src-qt5/core/libLumina/RootWindow.cpp @@ -10,6 +10,8 @@ #include <QScreen> #include <QDebug> +#define DEBUG 1 + // === PUBLIC === RootWindow::RootWindow() : QWidget(0, Qt::Window | Qt::BypassWindowManagerHint | Qt::WindowStaysOnBottomHint){ qRegisterMetaType<WId>("WId"); @@ -100,12 +102,14 @@ void RootWindow::updateScreenPixmap(screeninfo *info){ // === PUBLIC SLOTS === void RootWindow::ResizeRoot(){ + if(DEBUG){ qDebug() << "Resize Root..."; } QList<QScreen*> scrns = QApplication::screens(); //Update all the screen locations and ID's in the WALLPAPERS list QRect fullscreen; QStringList valid; //Update the size of the rootWindow itself for(int i=0; i<scrns.length(); i++){ + if(DEBUG){ qDebug() << " - Found Screen:" << scrns[i]->name() << scrns[i]->geometry(); } fullscreen = fullscreen.united(scrns[i]->geometry()); valid << scrns[i]->name(); for(int j=0; j<WALLPAPERS.length(); j++){ @@ -129,11 +133,13 @@ void RootWindow::ResizeRoot(){ } } //Trigger a repaint and send out any signals + if(DEBUG){ qDebug() << " - FullScreen Geometry:" << fullscreen; } this->setGeometry(fullscreen); this->update(); emit RootResized(fullscreen); if(!valid.isEmpty()){ emit NewScreens(valid); } if(!invalid.isEmpty()){ emit RemovedScreens(invalid); } + if(DEBUG){ qDebug() << " - Geom after change:" << this->geometry(); } } void RootWindow::ChangeWallpaper(QString id, RootWindow::ScaleType scale, QString file){ @@ -148,6 +154,7 @@ void RootWindow::ChangeWallpaper(QString id, RootWindow::ScaleType scale, QStrin } } if(!found){ + ResizeRoot(); //Need to create a new screeninfo structure QList<QScreen*> scrns = QApplication::screens(); for(int i=0; i<scrns.length(); i++){ diff --git a/src-qt5/core/lumina-desktop-unified/LSession.cpp b/src-qt5/core/lumina-desktop-unified/LSession.cpp index 0b9a9b35..60ed1a39 100644 --- a/src-qt5/core/lumina-desktop-unified/LSession.cpp +++ b/src-qt5/core/lumina-desktop-unified/LSession.cpp @@ -18,8 +18,6 @@ NativeWindowSystem* Lumina::NWS = 0; NativeEventFilter* Lumina::NEF = 0; LScreenSaver* Lumina::SS = 0; -//DesktopSettings* Lumina::SETTINGS = 0; -//Lumina::WM = 0; QThread* Lumina::EVThread = 0; RootWindow* Lumina::ROOTWIN = 0; XDGDesktopList* Lumina::APPLIST = 0; @@ -49,7 +47,6 @@ LSession::LSession(int &argc, char ** argv) : LSingleApplication(argc, argv, "lu //Now initialize the global objects (but do not start them yet) Lumina::NEF = new NativeEventFilter(); Lumina::NWS = new NativeWindowSystem(); - //Lumina::SETTINGS = new DesktopSettings(); Lumina::SS = new LScreenSaver(); //Now put the Native Window System into it's own thread to keep things snappy Lumina::EVThread = new QThread(); @@ -67,7 +64,6 @@ LSession::~LSession(){ //Clean up the global objects as needed if(Lumina::NEF!=0){ Lumina::NEF->deleteLater(); } if(Lumina::NWS!=0){ Lumina::NWS->deleteLater(); } - //if(Lumina::EFILTER!=0){ Lumina::EFILTER->deleteLater(); } if(Lumina::SS!=0){ Lumina::SS->deleteLater(); } if(Lumina::EVThread!=0){ if(Lumina::EVThread->isRunning()){ Lumina::EVThread->quit(); } diff --git a/src-qt5/core/lumina-desktop-unified/main.cpp b/src-qt5/core/lumina-desktop-unified/main.cpp index 0b67de46..8e40f7eb 100644 --- a/src-qt5/core/lumina-desktop-unified/main.cpp +++ b/src-qt5/core/lumina-desktop-unified/main.cpp @@ -30,6 +30,8 @@ int main(int argc, char ** argv) setenv("XDG_CURRENT_DESKTOP","Lumina",1); setenv("QT_NO_GLIB", "1", 1); //Disable the glib event loop within Qt at runtime (performance hit + bugs) unsetenv("QT_QPA_PLATFORMTHEME"); //causes issues with Lumina themes - not many people have this by default... + unsetenv("QT_AUTO_SCREEN_SCALE_FACTOR"); //need exact-pixel measurements (no fake scaling) + //Startup the session if(DEBUG){ qDebug() << "Starting unified session"; } LSession a(argc, argv); |