diff options
author | Ken Moore <ken@ixsystems.com> | 2018-01-08 14:19:58 -0500 |
---|---|---|
committer | Ken Moore <ken@ixsystems.com> | 2018-01-08 14:19:58 -0500 |
commit | 9fe1845f0e2d75dc8a6d3d49fac6780b394b0067 (patch) | |
tree | 606fbe23fe8d0cd7311b4fe6910f5136dc9bccc8 /src-qt5/core/lumina-desktop-unified/src-desktop/DesktopManager.cpp | |
parent | Changed color and removed comments from Matrix screensaver (diff) | |
download | lumina-9fe1845f0e2d75dc8a6d3d49fac6780b394b0067.tar.gz lumina-9fe1845f0e2d75dc8a6d3d49fac6780b394b0067.tar.bz2 lumina-9fe1845f0e2d75dc8a6d3d49fac6780b394b0067.zip |
Another large update to Lumina 2:
Starting to hook up the new QML window frame with the C++ backend.
Diffstat (limited to 'src-qt5/core/lumina-desktop-unified/src-desktop/DesktopManager.cpp')
-rw-r--r-- | src-qt5/core/lumina-desktop-unified/src-desktop/DesktopManager.cpp | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/src-qt5/core/lumina-desktop-unified/src-desktop/DesktopManager.cpp b/src-qt5/core/lumina-desktop-unified/src-desktop/DesktopManager.cpp index d6d06be9..b9ea3078 100644 --- a/src-qt5/core/lumina-desktop-unified/src-desktop/DesktopManager.cpp +++ b/src-qt5/core/lumina-desktop-unified/src-desktop/DesktopManager.cpp @@ -76,7 +76,7 @@ void DesktopManager::updateWallpaper(QString screen_id, int wkspace){ } //Now go ahead and set the wallpaper in the screen object if(wpaper.isEmpty() || wpaper=="default"){ wpaper = LOS::LuminaShare()+"desktop-background.jpg"; } //failover image - qDebug() << "Updating Wallpaper:" << screen_id << wpaper; + //qDebug() << "Updating Wallpaper:" << screen_id << wpaper; RootDesktopObject::instance()->ChangeWallpaper(screen_id,QUrl::fromLocalFile(wpaper).toString() ); } @@ -91,7 +91,7 @@ void DesktopManager::updatePlugins(QString plugin_id){ // === PUBLIC SLOTS === void DesktopManager::workspaceChanged(int wknum){ qDebug() << "Got Workspace Changed:" << wknum; - + syncWindowList(); } void DesktopManager::settingsChanged(DesktopSettings::File type){ @@ -112,6 +112,35 @@ void DesktopManager::settingsChanged(DesktopSettings::File type){ } } +void DesktopManager::NewWindowAvailable(NativeWindowObject* win){ + //connect(win, SIGNAL(WindowClosed(WId)), this, SLOT(syncWindowList()) ); + syncWindowList(); +} + +void DesktopManager::NewTrayWindowAvailable(NativeWindowObject* win){ + //connect(win, SIGNAL(WindowClosed(WId)), this, SLOT(syncTrayWindowList()) ); + syncTrayWindowList(); +} + +void DesktopManager::syncWindowList(){ + QList<NativeWindowObject*> allWins = Lumina::NWS->currentWindows(); + //Filter out all the windows not in the current workspace + QList<NativeWindowObject*> current; + QList<NativeWindowObject*> currentStacked; + int wkspace = Lumina::NWS->currentWorkspace(); + for(int i=0; i<allWins.length(); i++){ + if(allWins[i]->isSticky() || (allWins[i]->workspace() == wkspace)){ + current << allWins[i]; + } + } + //qDebug() << "Synced Window List:" << current.length(); + RootDesktopObject::instance()->setWindows(current); +} + +void DesktopManager::syncTrayWindowList(){ + +} + // === PRIVATE SLOTS === void DesktopManager::updateDesktopSettings(){ qDebug() << "Update Desktop Settings..."; @@ -136,4 +165,3 @@ void DesktopManager::updateMenuSettings(){ void DesktopManager::updateAnimationSettings(){ } - |