From: "Rodolfo García Peñas (kix)" <[email protected]>
The function wIsADrawer() doesn't use the argument WScreen, so can
be removed.
---
src/dock.c | 10 +++++-----
src/dock.h | 2 +-
src/dockedapp.c | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/dock.c b/src/dock.c
index c0a2482..acb497e 100644
--- a/src/dock.c
+++ b/src/dock.c
@@ -1421,7 +1421,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);
@@ -3457,7 +3457,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];
@@ -3549,7 +3549,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);
@@ -3627,7 +3627,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)))
@@ -4536,7 +4536,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 d88deed..5fd4637 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 d66acd2..52795a9 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);
--
1.7.10.4
--
To unsubscribe, send mail to [email protected].