Skip to content

Commit 55d88d8

Browse files
authored
fix(process-list): defer IPC actions until modal is loaded (#2829)
Port 1.5
1 parent a803f96 commit 55d88d8

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

quickshell/DMSShellIPC.qml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,10 @@ Item {
179179
IpcHandler {
180180
function open(): string {
181181
root.processListModalLoader.active = true;
182-
if (root.processListModalLoader.item)
183-
root.processListModalLoader.item.show();
182+
Qt.callLater(() => {
183+
if (root.processListModalLoader.item)
184+
root.processListModalLoader.item.show();
185+
});
184186

185187
return "PROCESSLIST_OPEN_SUCCESS";
186188
}
@@ -194,16 +196,20 @@ Item {
194196

195197
function toggle(): string {
196198
root.processListModalLoader.active = true;
197-
if (root.processListModalLoader.item)
198-
root.processListModalLoader.item.toggle();
199+
Qt.callLater(() => {
200+
if (root.processListModalLoader.item)
201+
root.processListModalLoader.item.toggle();
202+
});
199203

200204
return "PROCESSLIST_TOGGLE_SUCCESS";
201205
}
202206

203207
function focusOrToggle(): string {
204208
root.processListModalLoader.active = true;
205-
if (root.processListModalLoader.item)
206-
root.processListModalLoader.item.focusOrToggle();
209+
Qt.callLater(() => {
210+
if (root.processListModalLoader.item)
211+
root.processListModalLoader.item.focusOrToggle();
212+
});
207213

208214
return "PROCESSLIST_FOCUS_OR_TOGGLE_SUCCESS";
209215
}

0 commit comments

Comments
 (0)