mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-07 03:22:33 +01:00
Remove wallpaper when monitor setup changed. For now we do not try to recreate the setup.
This commit is contained in:
parent
da9d549228
commit
de3d3f5c28
@ -42,6 +42,7 @@ App::App()
|
||||
|
||||
// When the installed storage path changed
|
||||
QObject::connect(m_settings.get(), &Settings::resetInstalledListmodel, m_installedListModel.get(), &InstalledListModel::reset);
|
||||
QObject::connect(m_monitorListModel.get(), &MonitorListModel::monitorConfigurationChanged, m_sdkConnector.get(), &SDKConnector::closeAllWallpapers);
|
||||
|
||||
// Init after we have the paths from settings
|
||||
m_installedListModel->init();
|
||||
|
@ -6,7 +6,6 @@
|
||||
#include <QGuiApplication>
|
||||
#include <QRect>
|
||||
#include <QScreen>
|
||||
#include <QSharedPointer>
|
||||
#include <QSize>
|
||||
#include <QString>
|
||||
#include <QVector>
|
||||
@ -80,10 +79,11 @@ public:
|
||||
|
||||
std::optional<QString> getAppIDByMonitorIndex(const int index) const;
|
||||
|
||||
|
||||
signals:
|
||||
void monitorReloadCompleted();
|
||||
void setNewActiveMonitor(int index, QString path);
|
||||
void monitorListChanged();
|
||||
void monitorConfigurationChanged();
|
||||
|
||||
public slots:
|
||||
void reset();
|
||||
@ -92,14 +92,14 @@ public slots:
|
||||
|
||||
void screenAdded(QScreen* screen)
|
||||
{
|
||||
Q_UNUSED(screen)
|
||||
qDebug() << "screenAdded";
|
||||
qDebug() << "screenAdded" << screen->geometry()<< m_monitorList.size();
|
||||
emit monitorConfigurationChanged();
|
||||
reset();
|
||||
}
|
||||
void screenRemoved(QScreen* screen)
|
||||
{
|
||||
Q_UNUSED(screen)
|
||||
qDebug() << "screenRemoved";
|
||||
qDebug() << "screenRemoved"<< screen->geometry() << m_monitorList.size();
|
||||
emit monitorConfigurationChanged();
|
||||
reset();
|
||||
}
|
||||
|
||||
@ -109,6 +109,7 @@ public slots:
|
||||
return app->screens().at(0)->availableVirtualGeometry();
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
void loadMonitors();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user