1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 12:28:22 +01:00

wClipIconPaint appicon argument removed

Because the wClipIconPaint() function is specific to paint the clip,
it knows where is the clip (wks_info.clip_icon), so the argument is not
needed.

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
This commit is contained in:
Rodolfo García Peñas (kix)
2013-10-08 00:56:40 +02:00
committed by Carlos R. Mafra
parent 2103fe390b
commit 014bc52531
5 changed files with 12 additions and 11 deletions

View File

@@ -1228,7 +1228,7 @@ void wDefaultUpdateIcons(WScreen *scr)
}
if (!wPreferences.flags.noclip || wPreferences.flags.clip_merged_in_dock)
wClipIconPaint(w_global.clip.icon);
wClipIconPaint();
for (dc = scr->drawers; dc != NULL; dc = dc->next)
wDrawerIconPaint(dc->adrawer->icon_array[0]);

View File

@@ -1363,8 +1363,9 @@ void wDockDestroy(WDock *dock)
wfree(dock);
}
void wClipIconPaint(WAppIcon *aicon)
void wClipIconPaint(void)
{
WAppIcon *aicon = w_global.clip.icon;
WScreen *scr = aicon->icon->core->screen_ptr;
WWorkspace *workspace = w_global.workspace.array[w_global.workspace.current];
WMColor *color;
@@ -1408,13 +1409,13 @@ void wClipIconPaint(WAppIcon *aicon)
static void clipIconExpose(WObjDescriptor *desc, XEvent *event)
{
wClipIconPaint(desc->parent);
wClipIconPaint();
}
static void dockIconPaint(WAppIcon *btn)
{
if (btn == w_global.clip.icon) {
wClipIconPaint(btn);
wClipIconPaint();
} else if (wIsADrawer(btn)) {
wDrawerIconPaint(btn);
} else {
@@ -3861,7 +3862,7 @@ static void handleClipChangeWorkspace(WScreen *scr, XEvent *event)
clip->lclip_button_pushed = direction == CLIP_REWIND;
clip->rclip_button_pushed = direction == CLIP_FORWARD;
wClipIconPaint(w_global.clip.icon);
wClipIconPaint();
done = 0;
while (!done) {
WMMaskEvent(dpy, ExposureMask | ButtonMotionMask | ButtonReleaseMask | ButtonPressMask, &ev);
@@ -3876,7 +3877,7 @@ static void handleClipChangeWorkspace(WScreen *scr, XEvent *event)
direction = new_dir;
clip->lclip_button_pushed = direction == CLIP_REWIND;
clip->rclip_button_pushed = direction == CLIP_FORWARD;
wClipIconPaint(w_global.clip.icon);
wClipIconPaint();
}
break;
@@ -3908,7 +3909,7 @@ static void handleClipChangeWorkspace(WScreen *scr, XEvent *event)
wWorkspaceChange(scr, w_global.workspace.count - 1);
}
wClipIconPaint(w_global.clip.icon);
wClipIconPaint();
}
static void iconMouseDown(WObjDescriptor *desc, XEvent *event)

View File

@@ -96,7 +96,7 @@ void wDockLaunchWithState(WDock *dock, WAppIcon *btn, WSavedState *state);
int wDockReceiveDNDDrop(WScreen *scr, XEvent *event);
#endif
void wClipIconPaint(WAppIcon *aicon);
void wClipIconPaint(void);
void wClipSaveState(WScreen *scr);
WMPropList *wClipSaveWorkspaceState(WScreen *scr, int workspace);
WAppIcon *wClipRestoreState(WScreen *scr, WMPropList *clip_state);

View File

@@ -178,7 +178,7 @@ static void panelBtnCallback(WMWidget * self, void *data)
// Cf dock.c:dockIconPaint(WAppIcon *aicon)?
if (aicon == w_global.clip.icon)
wClipIconPaint(aicon);
wClipIconPaint();
else if (wIsADrawer(aicon))
wDrawerIconPaint(aicon);
else

View File

@@ -624,7 +624,7 @@ void wWorkspaceForceChange(WScreen * scr, int workspace)
XMapWindow(dpy, w_global.clip.icon->icon->core->window);
}
else if (w_global.clip.icon != NULL) {
wClipIconPaint(w_global.clip.icon);
wClipIconPaint();
}
wScreenUpdateUsableArea(scr);
wNETWMUpdateDesktop(scr);
@@ -700,7 +700,7 @@ void wWorkspaceRename(WScreen *scr, int workspace, const char *name)
}
if (w_global.clip.icon)
wClipIconPaint(w_global.clip.icon);
wClipIconPaint();
WMPostNotificationName(WMNWorkspaceNameChanged, scr, (void *)(uintptr_t) workspace);
}