mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 12:28:22 +01:00
wAppIconPaint argument removed
This patch removes the wAppIconPaint() Bool flag, because now it is always False.
This commit is contained in:
committed by
Carlos R. Mafra
parent
a950d0e247
commit
cc1503a2f0
@@ -1545,7 +1545,7 @@ void wHideApplication(WApplication *wapp)
|
|||||||
|
|
||||||
#ifdef HIDDENDOT
|
#ifdef HIDDENDOT
|
||||||
if (wapp->app_icon)
|
if (wapp->app_icon)
|
||||||
wAppIconPaint(wapp->app_icon, False);
|
wAppIconPaint(wapp->app_icon);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1673,7 +1673,7 @@ void wUnhideApplication(WApplication *wapp, Bool miniwindows, Bool bringToCurren
|
|||||||
wArrangeIcons(scr, True);
|
wArrangeIcons(scr, True);
|
||||||
|
|
||||||
#ifdef HIDDENDOT
|
#ifdef HIDDENDOT
|
||||||
wAppIconPaint(wapp->app_icon, False);
|
wAppIconPaint(wapp->app_icon);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -257,7 +257,7 @@ void removeAppIconFor(WApplication *wapp)
|
|||||||
wIconUpdate(wapp->app_icon->icon);
|
wIconUpdate(wapp->app_icon->icon);
|
||||||
|
|
||||||
/* Paint it */
|
/* Paint it */
|
||||||
wAppIconPaint(wapp->app_icon, False);
|
wAppIconPaint(wapp->app_icon);
|
||||||
} else if (wapp->app_icon->docked) {
|
} else if (wapp->app_icon->docked) {
|
||||||
wapp->app_icon->running = 0;
|
wapp->app_icon->running = 0;
|
||||||
wDockDetach(wapp->app_icon->dock, wapp->app_icon);
|
wDockDetach(wapp->app_icon->dock, wapp->app_icon);
|
||||||
@@ -375,7 +375,7 @@ static void updateDockNumbers(WScreen * scr)
|
|||||||
}
|
}
|
||||||
#endif /* WS_INDICATOR */
|
#endif /* WS_INDICATOR */
|
||||||
|
|
||||||
void wAppIconPaint(WAppIcon *aicon, Bool update_icon)
|
void wAppIconPaint(WAppIcon *aicon)
|
||||||
{
|
{
|
||||||
WApplication *wapp;
|
WApplication *wapp;
|
||||||
WScreen *scr = aicon->icon->core->screen_ptr;
|
WScreen *scr = aicon->icon->core->screen_ptr;
|
||||||
@@ -385,9 +385,6 @@ void wAppIconPaint(WAppIcon *aicon, Bool update_icon)
|
|||||||
else
|
else
|
||||||
wapp = NULL;
|
wapp = NULL;
|
||||||
|
|
||||||
if (update_icon)
|
|
||||||
wIconUpdate(aicon->icon);
|
|
||||||
|
|
||||||
wIconPaint(aicon->icon);
|
wIconPaint(aicon->icon);
|
||||||
|
|
||||||
# ifdef WS_INDICATOR
|
# ifdef WS_INDICATOR
|
||||||
@@ -520,9 +517,7 @@ static void setIconCallback(WMenu *menu, WMenuEntry *entry)
|
|||||||
_("Could not open specified icon file"), _("OK"), NULL, NULL);
|
_("Could not open specified icon file"), _("OK"), NULL, NULL);
|
||||||
} else {
|
} else {
|
||||||
wDefaultChangeIcon(scr, icon->wm_instance, icon->wm_class, file);
|
wDefaultChangeIcon(scr, icon->wm_instance, icon->wm_class, file);
|
||||||
/* The image was updated previously at wIconChangeImageFile,
|
wAppIconPaint(icon);
|
||||||
* so we don't need update it here again */
|
|
||||||
wAppIconPaint(icon, False);
|
|
||||||
}
|
}
|
||||||
if (file)
|
if (file)
|
||||||
wfree(file);
|
wfree(file);
|
||||||
@@ -630,7 +625,7 @@ static void openApplicationMenu(WApplication * wapp, int x, int y)
|
|||||||
|
|
||||||
static void iconExpose(WObjDescriptor *desc, XEvent *event)
|
static void iconExpose(WObjDescriptor *desc, XEvent *event)
|
||||||
{
|
{
|
||||||
wAppIconPaint(desc->parent, False);
|
wAppIconPaint(desc->parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void iconDblClick(WObjDescriptor *desc, XEvent *event)
|
static void iconDblClick(WObjDescriptor *desc, XEvent *event)
|
||||||
@@ -997,7 +992,7 @@ void create_appicon_from_dock(WWindow *wwin, WApplication *wapp, Window main_win
|
|||||||
wIconUpdate(wapp->app_icon->icon);
|
wIconUpdate(wapp->app_icon->icon);
|
||||||
|
|
||||||
/* Paint it */
|
/* Paint it */
|
||||||
wAppIconPaint(wapp->app_icon, False);
|
wAppIconPaint(wapp->app_icon);
|
||||||
save_appicon(wapp->app_icon, True);
|
save_appicon(wapp->app_icon, True);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ WAppIcon *wAppIconCreateForDock(WScreen *scr, char *command, char *wm_instance,
|
|||||||
|
|
||||||
void create_appicon_from_dock(WWindow *wwin, WApplication *wapp, Window main_window);
|
void create_appicon_from_dock(WWindow *wwin, WApplication *wapp, Window main_window);
|
||||||
void wAppIconDestroy(WAppIcon *aicon);
|
void wAppIconDestroy(WAppIcon *aicon);
|
||||||
void wAppIconPaint(WAppIcon *aicon, Bool update_icon);
|
void wAppIconPaint(WAppIcon *aicon);
|
||||||
void wAppIconMove(WAppIcon *aicon, int x, int y);
|
void wAppIconMove(WAppIcon *aicon, int x, int y);
|
||||||
void makeAppIconFor(WApplication * wapp);
|
void makeAppIconFor(WApplication * wapp);
|
||||||
void removeAppIconFor(WApplication * wapp);
|
void removeAppIconFor(WApplication * wapp);
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ void wApplicationActivate(WApplication *wapp)
|
|||||||
#ifdef NEWAPPICON
|
#ifdef NEWAPPICON
|
||||||
if (wapp->app_icon) {
|
if (wapp->app_icon) {
|
||||||
wIconSetHighlited(wapp->app_icon->icon, True);
|
wIconSetHighlited(wapp->app_icon->icon, True);
|
||||||
wAppIconPaint(wapp->app_icon, False);
|
wAppIconPaint(wapp->app_icon);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -225,7 +225,7 @@ void wApplicationDeactivate(WApplication *wapp)
|
|||||||
#ifdef NEWAPPICON
|
#ifdef NEWAPPICON
|
||||||
if (wapp->app_icon) {
|
if (wapp->app_icon) {
|
||||||
wIconSetHighlited(wapp->app_icon->icon, False);
|
wIconSetHighlited(wapp->app_icon->icon, False);
|
||||||
wAppIconPaint(wapp->app_icon, False);
|
wAppIconPaint(wapp->app_icon);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -478,9 +478,7 @@ void wClientCheckProperty(WWindow * wwin, XPropertyEvent * event)
|
|||||||
wapp = wApplicationOf(wwin->main_window);
|
wapp = wApplicationOf(wwin->main_window);
|
||||||
if (wapp && wapp->app_icon) {
|
if (wapp && wapp->app_icon) {
|
||||||
wIconUpdate(wapp->app_icon->icon);
|
wIconUpdate(wapp->app_icon->icon);
|
||||||
/* The icon was updated in wIconUpdate, so we don't
|
wAppIconPaint(wapp->app_icon);
|
||||||
* need update it again here */
|
|
||||||
wAppIconPaint(wapp->app_icon, False);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1130,9 +1130,7 @@ void wDefaultUpdateIcons(WScreen *scr)
|
|||||||
if ((file && aicon->icon->file && strcmp(file, aicon->icon->file) != 0)
|
if ((file && aicon->icon->file && strcmp(file, aicon->icon->file) != 0)
|
||||||
|| (file && !aicon->icon->file)) {
|
|| (file && !aicon->icon->file)) {
|
||||||
wIconChangeImageFile(aicon->icon, file);
|
wIconChangeImageFile(aicon->icon, file);
|
||||||
/* The image was updated previously at wIconChangeImageFile,
|
wAppIconPaint(aicon);
|
||||||
* so we don't need update it here again */
|
|
||||||
wAppIconPaint(aicon, False);
|
|
||||||
}
|
}
|
||||||
aicon = aicon->next;
|
aicon = aicon->next;
|
||||||
}
|
}
|
||||||
|
|||||||
14
src/dock.c
14
src/dock.c
@@ -544,7 +544,7 @@ static void keepIconsCallback(WMenu *menu, WMenuEntry *entry)
|
|||||||
wIconUpdate(aicon->icon);
|
wIconUpdate(aicon->icon);
|
||||||
|
|
||||||
/* Paint it */
|
/* Paint it */
|
||||||
wAppIconPaint(aicon, False);
|
wAppIconPaint(aicon);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
save_appicon(aicon, True);
|
save_appicon(aicon, True);
|
||||||
@@ -1154,7 +1154,7 @@ static void dockIconPaint(WAppIcon *btn)
|
|||||||
if (btn == btn->icon->core->screen_ptr->clip_icon) {
|
if (btn == btn->icon->core->screen_ptr->clip_icon) {
|
||||||
wClipIconPaint(btn);
|
wClipIconPaint(btn);
|
||||||
} else {
|
} else {
|
||||||
wAppIconPaint(btn, False);
|
wAppIconPaint(btn);
|
||||||
save_appicon(btn, True);
|
save_appicon(btn, True);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1941,7 +1941,7 @@ Bool wDockAttachIcon(WDock *dock, WAppIcon *icon, int x, int y, Bool update_icon
|
|||||||
wIconUpdate(icon->icon);
|
wIconUpdate(icon->icon);
|
||||||
|
|
||||||
/* Paint it */
|
/* Paint it */
|
||||||
wAppIconPaint(icon, False);
|
wAppIconPaint(icon);
|
||||||
|
|
||||||
/* Save it */
|
/* Save it */
|
||||||
save_appicon(icon, True);
|
save_appicon(icon, True);
|
||||||
@@ -2092,7 +2092,7 @@ static Bool moveIconBetweenDocks(WDock *src, WDock *dest, WAppIcon *icon, int x,
|
|||||||
wIconUpdate(icon->icon);
|
wIconUpdate(icon->icon);
|
||||||
|
|
||||||
/* Paint it */
|
/* Paint it */
|
||||||
wAppIconPaint(icon, False);
|
wAppIconPaint(icon);
|
||||||
|
|
||||||
return True;
|
return True;
|
||||||
}
|
}
|
||||||
@@ -2169,7 +2169,7 @@ void wDockDetach(WDock *dock, WAppIcon *icon)
|
|||||||
wIconUpdate(icon->icon);
|
wIconUpdate(icon->icon);
|
||||||
|
|
||||||
/* Paint it */
|
/* Paint it */
|
||||||
wAppIconPaint(icon, False);
|
wAppIconPaint(icon);
|
||||||
|
|
||||||
if (wPreferences.auto_arrange_icons)
|
if (wPreferences.auto_arrange_icons)
|
||||||
wArrangeIcons(dock->screen_ptr, True);
|
wArrangeIcons(dock->screen_ptr, True);
|
||||||
@@ -2916,7 +2916,7 @@ void wDockTrackWindowLaunch(WDock *dock, Window window)
|
|||||||
wLowerFrame(aicon->icon->core);
|
wLowerFrame(aicon->icon->core);
|
||||||
XMapWindow(dpy, aicon->icon->core->window);
|
XMapWindow(dpy, aicon->icon->core->window);
|
||||||
aicon->launching = 1;
|
aicon->launching = 1;
|
||||||
wAppIconPaint(aicon, False);
|
wAppIconPaint(aicon);
|
||||||
SlideWindow(aicon->icon->core->window, x0, y0, icon->x_pos, icon->y_pos);
|
SlideWindow(aicon->icon->core->window, x0, y0, icon->x_pos, icon->y_pos);
|
||||||
XUnmapWindow(dpy, aicon->icon->core->window);
|
XUnmapWindow(dpy, aicon->icon->core->window);
|
||||||
wAppIconDestroy(aicon);
|
wAppIconDestroy(aicon);
|
||||||
@@ -3992,7 +3992,7 @@ int wClipMakeIconOmnipresent(WAppIcon *aicon, int omnipresent)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wAppIconPaint(aicon, False);
|
wAppIconPaint(aicon);
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -177,12 +177,10 @@ static void panelBtnCallback(WMWidget * self, void *data)
|
|||||||
} else {
|
} else {
|
||||||
WAppIcon *aicon = panel->editedIcon;
|
WAppIcon *aicon = panel->editedIcon;
|
||||||
|
|
||||||
/* The image was updated in wIconChangeImageFile,
|
|
||||||
* so we don't need udpate it at wAppIconPaint */
|
|
||||||
if (aicon == aicon->icon->core->screen_ptr->clip_icon)
|
if (aicon == aicon->icon->core->screen_ptr->clip_icon)
|
||||||
wClipIconPaint(aicon);
|
wClipIconPaint(aicon);
|
||||||
else
|
else
|
||||||
wAppIconPaint(aicon, False);
|
wAppIconPaint(aicon);
|
||||||
|
|
||||||
wDefaultChangeIcon(panel->wwin->screen_ptr, aicon->wm_instance, aicon->wm_class, text);
|
wDefaultChangeIcon(panel->wwin->screen_ptr, aicon->wm_instance, aicon->wm_class, text);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -790,9 +790,7 @@ static void applySettings(WMButton *button, InspectorPanel *panel)
|
|||||||
if (file)
|
if (file)
|
||||||
wfree(file);
|
wfree(file);
|
||||||
|
|
||||||
/* The image was updated in wIconChangeImageFile,
|
wAppIconPaint(wapp->app_icon);
|
||||||
* so we don't need udpate it at wAppIconPaint */
|
|
||||||
wAppIconPaint(wapp->app_icon, False);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -474,8 +474,7 @@ static void updateIconImage(WWindow *wwin)
|
|||||||
WApplication *app = wApplicationOf(wwin->main_window);
|
WApplication *app = wApplicationOf(wwin->main_window);
|
||||||
if (app && app->app_icon) {
|
if (app && app->app_icon) {
|
||||||
wIconUpdate(app->app_icon->icon);
|
wIconUpdate(app->app_icon->icon);
|
||||||
/* Icon was updated in wIconUpdate, so we don't need update it again */
|
wAppIconPaint(app->app_icon);
|
||||||
wAppIconPaint(app->app_icon, False);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -594,7 +594,7 @@ void wWorkspaceForceChange(WScreen * scr, int workspace)
|
|||||||
wArrangeIcons(scr, False);
|
wArrangeIcons(scr, False);
|
||||||
|
|
||||||
if (scr->dock)
|
if (scr->dock)
|
||||||
wAppIconPaint(scr->dock->icon_array[0], False);
|
wAppIconPaint(scr->dock->icon_array[0]);
|
||||||
|
|
||||||
if (scr->clip_icon) {
|
if (scr->clip_icon) {
|
||||||
if (scr->workspaces[workspace]->clip->auto_collapse ||
|
if (scr->workspaces[workspace]->clip->auto_collapse ||
|
||||||
|
|||||||
Reference in New Issue
Block a user