Set hide to false when window is shown
This commit is contained in:
@@ -1507,6 +1507,14 @@ void MainWindow::StopAfterCurrent() {
|
|||||||
emit StopAfterToggled(app_->playlist_manager()->active()->stop_after_current());
|
emit StopAfterToggled(app_->playlist_manager()->active()->stop_after_current());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::showEvent(QShowEvent *e) {
|
||||||
|
|
||||||
|
hidden_ = false;
|
||||||
|
|
||||||
|
QMainWindow::showEvent(e);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::closeEvent(QCloseEvent *e) {
|
void MainWindow::closeEvent(QCloseEvent *e) {
|
||||||
|
|
||||||
if (!hidden_ && keep_running_ && e->spontaneous() && QSystemTrayIcon::isSystemTrayAvailable()) {
|
if (!hidden_ && keep_running_ && e->spontaneous() && QSystemTrayIcon::isSystemTrayAvailable()) {
|
||||||
@@ -2211,9 +2219,11 @@ void MainWindow::CommandlineOptionsReceived(const quint32 instanceId, const QByt
|
|||||||
raise();
|
raise();
|
||||||
show();
|
show();
|
||||||
activateWindow();
|
activateWindow();
|
||||||
|
hidden_ = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
CommandlineOptionsReceived(options);
|
CommandlineOptionsReceived(options);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::CommandlineOptionsReceived(const CommandlineOptions &options) {
|
void MainWindow::CommandlineOptionsReceived(const CommandlineOptions &options) {
|
||||||
@@ -2713,8 +2723,11 @@ void MainWindow::PlaylistCurrentChanged(const QModelIndex &proxy_current) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::Raise() {
|
void MainWindow::Raise() {
|
||||||
|
|
||||||
show();
|
show();
|
||||||
activateWindow();
|
activateWindow();
|
||||||
|
hidden_ = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||||
|
|||||||
@@ -114,8 +114,9 @@ class MainWindow : public QMainWindow, public PlatformInterface {
|
|||||||
void CommandlineOptionsReceived(const CommandlineOptions &options);
|
void CommandlineOptionsReceived(const CommandlineOptions &options);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void keyPressEvent(QKeyEvent *e) override;
|
void showEvent(QShowEvent *e) override;
|
||||||
void closeEvent(QCloseEvent *e) override;
|
void closeEvent(QCloseEvent *e) override;
|
||||||
|
void keyPressEvent(QKeyEvent *e) override;
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||||
bool nativeEvent(const QByteArray &eventType, void *message, qintptr *result) override;
|
bool nativeEvent(const QByteArray &eventType, void *message, qintptr *result) override;
|
||||||
#else
|
#else
|
||||||
|
|||||||
Reference in New Issue
Block a user