mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 12:28:22 +01:00
Fixed crashing bug related to omnipresent icons in clip (fixes bug #1167)
This commit is contained in:
@@ -7,6 +7,7 @@ Changes since version 0.61.0:
|
||||
- fixed problem with fonts in WINGs (Masahide -mac- NODA
|
||||
<mac@flab.fujitsu.co.jp>)
|
||||
- fixed crashing bug when saving session information.
|
||||
- fixed crashing bug related to onmipresent icons in Clip
|
||||
|
||||
|
||||
Changes since version 0.60.0:
|
||||
|
||||
@@ -402,7 +402,8 @@ wAppIconPaint(WAppIcon *aicon)
|
||||
|
||||
|
||||
# ifdef WS_INDICATOR
|
||||
if (aicon->docked && scr->dock && aicon->yindex==0)
|
||||
if (aicon->docked && scr->dock && scr->dock==aicon->dock &&
|
||||
aicon->yindex==0)
|
||||
updateDockNumbers(scr);
|
||||
# endif
|
||||
if (scr->dock_dots && aicon->docked && !aicon->running
|
||||
|
||||
24
src/dock.c
24
src/dock.c
@@ -2417,6 +2417,11 @@ wDockDetach(WDock *dock, WAppIcon *icon)
|
||||
DestroyDockAppSettingsPanel(icon->panel);
|
||||
}
|
||||
|
||||
/* This must be called before icon->dock is set to NULL.
|
||||
* Don't move it. -Dan
|
||||
*/
|
||||
wClipMakeIconOmnipresent(icon, False);
|
||||
|
||||
icon->docked = 0;
|
||||
icon->dock = NULL;
|
||||
icon->attracted = 0;
|
||||
@@ -2425,11 +2430,6 @@ wDockDetach(WDock *dock, WAppIcon *icon)
|
||||
icon->icon->force_paint = 1;
|
||||
}
|
||||
|
||||
/* This must be called before dock->icon_array[index] is set to NULL.
|
||||
* Don't move it. -Dan
|
||||
*/
|
||||
wClipMakeIconOmnipresent(icon, False);
|
||||
|
||||
/* deselect the icon */
|
||||
if (icon->icon->selected)
|
||||
wIconSelect(icon->icon);
|
||||
@@ -4441,8 +4441,10 @@ wClipMakeIconOmnipresent(WAppIcon *aicon, int omnipresent)
|
||||
WAppIconChain *new_entry, *tmp, *tmp1;
|
||||
int status = WO_SUCCESS;
|
||||
|
||||
if (aicon->dock == scr->dock || aicon == scr->clip_icon)
|
||||
if ((!wPreferences.flags.nodock && aicon->dock == scr->dock) ||
|
||||
aicon == scr->clip_icon) {
|
||||
return WO_NOT_APPLICABLE;
|
||||
}
|
||||
|
||||
if (aicon->omnipresent == omnipresent)
|
||||
return WO_SUCCESS;
|
||||
@@ -4452,16 +4454,8 @@ wClipMakeIconOmnipresent(WAppIcon *aicon, int omnipresent)
|
||||
aicon->omnipresent = 1;
|
||||
new_entry = wmalloc(sizeof(WAppIconChain));
|
||||
new_entry->aicon = aicon;
|
||||
new_entry->next = NULL;
|
||||
if (!scr->global_icons) {
|
||||
new_entry->next = scr->global_icons;
|
||||
scr->global_icons = new_entry;
|
||||
} else {
|
||||
tmp = scr->global_icons;
|
||||
while (tmp->next)
|
||||
tmp = tmp->next;
|
||||
|
||||
tmp->next = new_entry;
|
||||
}
|
||||
scr->global_icon_count++;
|
||||
} else {
|
||||
aicon->omnipresent = 0;
|
||||
|
||||
@@ -244,21 +244,6 @@ panelBtnCallback(WMWidget *self, void *data)
|
||||
updateDNDCommand(panel->editedIcon, text);
|
||||
#endif
|
||||
|
||||
#ifdef dan_remove_later
|
||||
omnipresent = WMGetButtonSelected(panel->omnipresentBtn);
|
||||
if (wClipMakeIconOmnipresent(panel->editedIcon, omnipresent) ==
|
||||
WO_FAILED) {
|
||||
wMessageDialog(panel->wwin->screen_ptr, _("Error"),
|
||||
_("Sorry, icon cannot be made omnipresent. "
|
||||
"Please make sure that no other icon is "
|
||||
"docked in the same position on the other "
|
||||
"workspaces, and the Clip is not full in "
|
||||
"some workspace, then try again."),
|
||||
_("OK"), NULL, NULL);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
panel->editedIcon->auto_launch =
|
||||
WMGetButtonSelected(panel->autoLaunchBtn);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user