diff --git a/src/applicationmodel.cpp b/src/applicationmodel.cpp index 9d0910e..6bbbaf5 100644 --- a/src/applicationmodel.cpp +++ b/src/applicationmodel.cpp @@ -199,6 +199,10 @@ bool ApplicationModel::openNewInstance(const QString &appId) return false; QProcess process; + + if (appId == "cutefish-launcher") + process.setArguments(QStringList() << "--show"); + if (!item->exec.isEmpty()) { QStringList args = item->exec.split(" "); process.setProgram(args.first()); diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 6c49dfc..1f210a5 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -123,6 +123,11 @@ int MainWindow::direction() const return DockSettings::self()->direction(); } +int MainWindow::visibility() const +{ + return DockSettings::self()->visibility(); +} + void MainWindow::setDirection(int direction) { DockSettings::self()->setDirection(static_cast(direction)); @@ -351,6 +356,8 @@ void MainWindow::onIconSizeChanged() void MainWindow::onVisibilityChanged() { + emit visibilityChanged(); + if (m_activity->launchPad()) { m_hideTimer->stop(); clearViewStruts(); diff --git a/src/mainwindow.h b/src/mainwindow.h index 18a4b95..9e6dbb5 100644 --- a/src/mainwindow.h +++ b/src/mainwindow.h @@ -34,6 +34,7 @@ class MainWindow : public QQuickView Q_OBJECT Q_PROPERTY(QRect primaryGeometry READ primaryGeometry NOTIFY primaryGeometryChanged) Q_PROPERTY(int direction READ direction NOTIFY directionChanged) + Q_PROPERTY(int visibility READ visibility NOTIFY visibilityChanged) public: explicit MainWindow(QQuickView *parent = nullptr); @@ -47,6 +48,8 @@ public: QRect primaryGeometry() const; int direction() const; + int visibility() const; + void setDirection(int direction); void setIconSize(int iconSize); void setVisibility(int visibility); @@ -58,6 +61,7 @@ signals: void iconSizeChanged(); void directionChanged(); void primaryGeometryChanged(); + void visibilityChanged(); private: QRect windowRect() const; diff --git a/src/org.Cutefish.Dock.xml b/src/org.Cutefish.Dock.xml index 3134a0b..9f8a99b 100644 --- a/src/org.Cutefish.Dock.xml +++ b/src/org.Cutefish.Dock.xml @@ -17,8 +17,10 @@ + +