mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-23 22:52:34 +01:00
Compiler food.
This patch set the variable aicon to NULL, to avoid compiler warnings. This patch also adds some code style.
This commit is contained in:
committed by
Carlos R. Mafra
parent
f53797f9ef
commit
97ecb7b613
10
src/dock.c
10
src/dock.c
@@ -4342,7 +4342,7 @@ static void drawerDestroy(WDock *drawer)
|
|||||||
{
|
{
|
||||||
WScreen *scr;
|
WScreen *scr;
|
||||||
int i;
|
int i;
|
||||||
WAppIcon *aicon;
|
WAppIcon *aicon = NULL;
|
||||||
WMArray *icons;
|
WMArray *icons;
|
||||||
|
|
||||||
if (drawer == NULL)
|
if (drawer == NULL)
|
||||||
@@ -4353,21 +4353,21 @@ static void drawerDestroy(WDock *drawer)
|
|||||||
/* Note regarding menus: we can't delete any dock/clip/drawer menu, because
|
/* Note regarding menus: we can't delete any dock/clip/drawer menu, because
|
||||||
* that would (attempt to) wfree some memory in gettext library (see menu
|
* that would (attempt to) wfree some memory in gettext library (see menu
|
||||||
* entries that have several "versions", such like "Hide" and "Unhide"). */
|
* entries that have several "versions", such like "Hide" and "Unhide"). */
|
||||||
|
|
||||||
wDefaultPurgeInfo(scr, drawer->icon_array[0]->wm_instance,
|
wDefaultPurgeInfo(scr, drawer->icon_array[0]->wm_instance,
|
||||||
drawer->icon_array[0]->wm_class);
|
drawer->icon_array[0]->wm_class);
|
||||||
|
|
||||||
if (drawer->icon_count == 2) {
|
if (drawer->icon_count == 2) {
|
||||||
// Drawer contains a single appicon: dock it where the drawer was
|
/* Drawer contains a single appicon: dock it where the drawer was */
|
||||||
for (i = 1; i < drawer->max_icons; i++) {
|
for (i = 1; i < drawer->max_icons; i++) {
|
||||||
if ((aicon = drawer->icon_array[i]))
|
if ((aicon = drawer->icon_array[i]))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
wDockMoveIconBetweenDocks(drawer, scr->dock, aicon,
|
wDockMoveIconBetweenDocks(drawer, scr->dock, aicon,
|
||||||
0, (drawer->y_pos - scr->dock->y_pos) / ICON_SIZE);
|
0, (drawer->y_pos - scr->dock->y_pos) / ICON_SIZE);
|
||||||
XMoveWindow(dpy, aicon->icon->core->window, drawer->x_pos, drawer->y_pos);
|
XMoveWindow(dpy, aicon->icon->core->window, drawer->x_pos, drawer->y_pos);
|
||||||
XMapWindow(dpy, aicon->icon->core->window);
|
XMapWindow(dpy, aicon->icon->core->window);
|
||||||
}
|
} else if (drawer->icon_count > 2) {
|
||||||
else if (drawer->icon_count > 2) {
|
|
||||||
icons = WMCreateArray(drawer->icon_count - 1);
|
icons = WMCreateArray(drawer->icon_count - 1);
|
||||||
for (i = 1; i < drawer->max_icons; i++) {
|
for (i = 1; i < drawer->max_icons; i++) {
|
||||||
if (!(aicon = drawer->icon_array[i]))
|
if (!(aicon = drawer->icon_array[i]))
|
||||||
|
|||||||
Reference in New Issue
Block a user