Skip to content

Commit dfb361e

Browse files
committed
Workspace/WM/dock.c: show alert panels in async Workspace dispatch queue.
1 parent 84b7286 commit dfb361e

File tree

1 file changed

+22
-14
lines changed
  • Applications/Workspace/WM

1 file changed

+22
-14
lines changed

Applications/Workspace/WM/dock.c

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -399,21 +399,25 @@ static void omnipresentCallback(WMenu *menu, WMenuItem *entry)
399399
}
400400
CFRelease(selectedIcons);
401401
if (failed > 1) {
402-
WSRunAlertPanel(_("Dock: Warning"),
403-
_("Some icons cannot be made omnipresent. "
402+
dispatch_async(workspace_q, ^{
403+
WSRunAlertPanel("Dock: Warning",
404+
"Some icons cannot be made omnipresent. "
404405
"Please make sure that no other icon is "
405406
"docked in the same positions on the other "
406407
"desktops and the Clip is not full in "
407-
"some desktop."),
408-
_("OK"), NULL, NULL);
408+
"some desktop.",
409+
"OK", NULL, NULL);
410+
});
409411
} else if (failed == 1) {
410-
WSRunAlertPanel(_("Dock: Warning"),
411-
_("Icon cannot be made omnipresent. "
412+
dispatch_async(workspace_q, ^{
413+
WSRunAlertPanel("Dock: Warning",
414+
"Icon cannot be made omnipresent. "
412415
"Please make sure that no other icon is "
413416
"docked in the same position on the other "
414417
"desktops and the Clip is not full in "
415-
"some desktop."),
416-
_("OK"), NULL, NULL);
418+
"some desktop.",
419+
"OK", NULL, NULL);
420+
});
417421
}
418422
}
419423

@@ -1894,9 +1898,11 @@ Bool wDockAttachIcon(WDock *dock, WAppIcon *icon, int x, int y, Bool update_icon
18941898
if (command) {
18951899
icon->command = command;
18961900
} else {
1897-
WSRunAlertPanel("Desktop Dock",
1898-
"Application icon without command set cannot be attached to Dock.", _("OK"),
1899-
NULL, NULL);
1901+
dispatch_async(workspace_q, ^{
1902+
WSRunAlertPanel("Desktop Dock",
1903+
"Application icon without command set cannot be attached to Dock.", _("OK"),
1904+
NULL, NULL);
1905+
});
19001906
return False;
19011907
}
19021908
}
@@ -2019,9 +2025,11 @@ Bool wDockMoveIconBetweenDocks(WDock *src, WDock *dest, WAppIcon *icon, int x, i
20192025
if (command) {
20202026
icon->command = command;
20212027
} else {
2022-
WSRunAlertPanel("Desktop Dock",
2023-
"Application icon without command set cannot be attached to Dock.", _("OK"),
2024-
NULL, NULL);
2028+
dispatch_async(workspace_q, ^{
2029+
WSRunAlertPanel("Desktop Dock",
2030+
"Application icon without command set cannot be attached to Dock.", _("OK"),
2031+
NULL, NULL);
2032+
});
20252033
return False;
20262034
}
20272035
}

0 commit comments

Comments
 (0)