Skip to content

Commit 86a43f3

Browse files
committed
fix: Uninstalling app in fullscreen doesn't close launcher
fix Uninstalling an app in full screen doesn't close launcher pms-bug-315255
1 parent a9c8f52 commit 86a43f3

4 files changed

Lines changed: 27 additions & 4 deletions

File tree

launchercontroller.cpp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,10 @@ void LauncherController::hideWithTimer()
159159
m_pendingHide = true;
160160
return;
161161
}
162-
163-
qDebug() << "hide with timer";
164-
setVisible(false);
162+
if (m_avoidHide) {
163+
qDebug() << "hide with timer";
164+
setVisible(false);
165+
}
165166
}
166167
}
167168

@@ -183,3 +184,8 @@ void LauncherController::closeAllPopups()
183184
Q_ASSERT(qAppPrivate);
184185
qAppPrivate->closeAllPopups();
185186
}
187+
188+
void LauncherController::setAvoidHide(bool avoidHide)
189+
{
190+
m_avoidHide = avoidHide;
191+
}

launchercontroller.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ class LauncherController : public QObject
4747
void setCurrentFrame(const QString & frame);
4848

4949
Q_INVOKABLE void hideWithTimer();
50+
Q_INVOKABLE void setAvoidHide(bool avoidHide);
5051
Q_INVOKABLE void cancelHide();
5152
Q_INVOKABLE QFont adjustFontWeight(const QFont& f, QFont::Weight weight);
5253

@@ -81,4 +82,5 @@ class LauncherController : public QObject
8182
bool m_visible;
8283
QString m_currentFrame;
8384
bool m_pendingHide = false;
85+
bool m_avoidHide = true;
8486
};

qml/AppItemMenu.qml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,12 @@ Loader {
126126
enabled: !root.desktopId.startsWith("internal/folders/") && !DesktopIntegration.appIsCompulsoryForDesktop(root.desktopId)
127127
text: qsTr("Uninstall")
128128
onTriggered: {
129-
LauncherController.visible = false
129+
if(LauncherController.currentFrame !== "FullscreenFrame"){
130+
LauncherController.setAvoidHide(true)
131+
LauncherController.visible = false
132+
}else{
133+
LauncherController.setAvoidHide(false)
134+
}
130135
confirmUninstallDlg.appName = root.display
131136
confirmUninstallDlg.appId = root.desktopId
132137
confirmUninstallDlg.icon = root.iconName

shell-launcher-applet/package/launcheritem.qml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,16 @@ AppletItem {
291291
minimumHeight: layout.implicitHeight + DStyle.Style.dialogWindow.titleBarHeight
292292
maximumWidth: minimumWidth
293293
maximumHeight: minimumHeight
294+
295+
onVisibleChanged: {
296+
if (!visible) {
297+
LauncherController.setAvoidHide(true)
298+
if (LauncherController.currentFrame === "FullscreenFrame") {
299+
fullscreenFrame.requestActivate()
300+
}
301+
}
302+
}
303+
294304
ColumnLayout {
295305
id: layout
296306
spacing: 0

0 commit comments

Comments
 (0)