Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion launchercontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,29 @@ bool LauncherController::visible() const

void LauncherController::setVisible(bool visible)
{
if (visible == m_visible) return;
if (!visible && m_showPending) {
m_showPending = false;
return;
}

if (visible == m_visible || (visible && m_showPending)) return;

if (visible && QGuiApplicationPrivate::popupCount() > 0) {
m_showPending = true;
closeAllPopups();

// Let Qt finish hiding the current popup and release the Wayland
// popup grab before the launcher window is mapped.
QTimer::singleShot(0, this, [this] {
if (!m_showPending) {
return;
}

m_showPending = false;
setVisible(true);
});
return;
}

m_visible = visible;

Expand Down
3 changes: 2 additions & 1 deletion launchercontroller.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
// SPDX-FileCopyrightText: 2023 - 2026 UnionTech Software Technology Co., Ltd.
//
// SPDX-License-Identifier: GPL-3.0-or-later

Expand Down Expand Up @@ -86,6 +86,7 @@ class LauncherController : public QObject
QTimer *m_timer;
Launcher1Adaptor * m_launcher1Adaptor;
bool m_visible;
bool m_showPending = false;
QString m_currentFrame;
QString m_currentScreen;
bool m_pendingHide = false;
Expand Down
Loading