diff --git a/src/dock.c b/src/dock.c index 48b240c9..3320f6c5 100644 --- a/src/dock.c +++ b/src/dock.c @@ -1416,7 +1416,7 @@ static void dockIconPaint(WAppIcon *btn) { if (btn == btn->icon->core->screen_ptr->clip_icon) { wClipIconPaint(btn); - } else if (wIsADrawer(btn->icon->core->screen_ptr, btn)) { + } else if (wIsADrawer(btn)) { wDrawerIconPaint(btn); } else { wAppIconPaint(btn); @@ -3452,7 +3452,7 @@ static void openDockMenu(WDock *dock, WAppIcon *aicon, XEvent *event) entry = dock->menu->entries[++index]; entry->clientdata = aicon; entry->flags.indicator_on = aicon->icon->selected; - wMenuSetEnabled(dock->menu, index, aicon != scr->clip_icon && !wIsADrawer(scr, aicon)); + wMenuSetEnabled(dock->menu, index, aicon != scr->clip_icon && !wIsADrawer(aicon)); /* select/unselect all icons */ entry = dock->menu->entries[++index]; @@ -3544,7 +3544,7 @@ static void openDockMenu(WDock *dock, WAppIcon *aicon, XEvent *event) /* kill or remove drawer */ entry = dock->menu->entries[++index]; entry->clientdata = aicon; - if (wIsADrawer(scr, aicon)) { + if (wIsADrawer(aicon)) { entry->callback = removeDrawerCallback; entry->text = _("Remove drawer"); wMenuSetEnabled(dock->menu, index, True); @@ -3622,7 +3622,7 @@ static void iconDblClick(WObjDescriptor *desc, XEvent *event) } else toggleCollapsed(dock); - } else if (wIsADrawer(dock->screen_ptr, btn)) { + } else if (wIsADrawer(btn)) { toggleCollapsed(dock); } else if (btn->command) { if (!btn->launching && (!btn->running || (event->xbutton.state & ControlMask))) @@ -4531,7 +4531,7 @@ static void swapDrawers(WScreen *scr, int on_right_side, int new_x) } -int wIsADrawer(WScreen *scr, WAppIcon *aicon) +int wIsADrawer(WAppIcon *aicon) { return aicon && aicon->dock && aicon->dock->type == WM_DRAWER && aicon->dock->icon_array[0] == aicon; diff --git a/src/dock.h b/src/dock.h index d88deed5..5fd46372 100644 --- a/src/dock.h +++ b/src/dock.h @@ -104,7 +104,7 @@ WAppIcon *wClipRestoreState(WScreen *scr, WMPropList *clip_state); void wDrawerIconPaint(WAppIcon *dicon); void wDrawersSaveState(WScreen *scr); void wDrawersRestoreState(WScreen *scr); -int wIsADrawer(WScreen *scr, WAppIcon *aicon); +int wIsADrawer(WAppIcon *aicon); void wClipUpdateForWorkspaceChange(WScreen *scr, int workspace); diff --git a/src/dockedapp.c b/src/dockedapp.c index b24f1277..4c77cfad 100644 --- a/src/dockedapp.c +++ b/src/dockedapp.c @@ -179,7 +179,7 @@ static void panelBtnCallback(WMWidget * self, void *data) // Cf dock.c:dockIconPaint(WAppIcon *aicon)? if (aicon == aicon->icon->core->screen_ptr->clip_icon) wClipIconPaint(aicon); - else if (wIsADrawer(aicon->icon->core->screen_ptr, aicon)) + else if (wIsADrawer(aicon)) wDrawerIconPaint(aicon); else wAppIconPaint(aicon);