From: "Rodolfo García Peñas (kix)" <[email protected]>

This patch removes the wAppIconPaint() Bool flag, because now is
always False.
---
 src/actions.c     |    4 ++--
 src/appicon.c     |   15 +++++----------
 src/appicon.h     |    2 +-
 src/application.c |    4 ++--
 src/client.c      |    4 +---
 src/defaults.c    |    4 +---
 src/dock.c        |   14 +++++++-------
 src/dockedapp.c   |    4 +---
 src/winspector.c  |    4 +---
 src/wmspec.c      |    3 +--
 src/workspace.c   |    2 +-
 11 files changed, 23 insertions(+), 37 deletions(-)

diff --git a/src/actions.c b/src/actions.c
index e168c56..7dceaff 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -1545,7 +1545,7 @@ void wHideApplication(WApplication *wapp)
 
 #ifdef HIDDENDOT
        if (wapp->app_icon)
-               wAppIconPaint(wapp->app_icon, False);
+               wAppIconPaint(wapp->app_icon);
 #endif
 }
 
@@ -1673,7 +1673,7 @@ void wUnhideApplication(WApplication *wapp, Bool 
miniwindows, Bool bringToCurren
                wArrangeIcons(scr, True);
 
 #ifdef HIDDENDOT
-       wAppIconPaint(wapp->app_icon, False);
+       wAppIconPaint(wapp->app_icon);
 #endif
 }
 
diff --git a/src/appicon.c b/src/appicon.c
index 8e8c22b..329bd6e 100644
--- a/src/appicon.c
+++ b/src/appicon.c
@@ -257,7 +257,7 @@ void removeAppIconFor(WApplication *wapp)
                wIconUpdate(wapp->app_icon->icon);
 
                /* Paint it */
-               wAppIconPaint(wapp->app_icon, False);
+               wAppIconPaint(wapp->app_icon);
        } else if (wapp->app_icon->docked) {
                wapp->app_icon->running = 0;
                wDockDetach(wapp->app_icon->dock, wapp->app_icon);
@@ -375,7 +375,7 @@ static void updateDockNumbers(WScreen * scr)
 }
 #endif                         /* WS_INDICATOR */
 
-void wAppIconPaint(WAppIcon *aicon, Bool update_icon)
+void wAppIconPaint(WAppIcon *aicon)
 {
        WApplication *wapp;
        WScreen *scr = aicon->icon->core->screen_ptr;
@@ -385,9 +385,6 @@ void wAppIconPaint(WAppIcon *aicon, Bool update_icon)
        else
                wapp = NULL;
 
-       if (update_icon)
-               wIconUpdate(aicon->icon);
-
        wIconPaint(aicon->icon);
 
 # ifdef WS_INDICATOR
@@ -520,9 +517,7 @@ static void setIconCallback(WMenu *menu, WMenuEntry *entry)
                                       _("Could not open specified icon file"), 
_("OK"), NULL, NULL);
                } else {
                        wDefaultChangeIcon(scr, icon->wm_instance, 
icon->wm_class, file);
-                       /* The image was updated previously at 
wIconChangeImageFile,
-                        * so we don't need update it here again */
-                       wAppIconPaint(icon, False);
+                       wAppIconPaint(icon);
                }
                if (file)
                        wfree(file);
@@ -630,7 +625,7 @@ static void openApplicationMenu(WApplication * wapp, int x, 
int y)
 
 static void iconExpose(WObjDescriptor *desc, XEvent *event)
 {
-       wAppIconPaint(desc->parent, False);
+       wAppIconPaint(desc->parent);
 }
 
 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);
 
                /* Paint it */
-               wAppIconPaint(wapp->app_icon, False);
+               wAppIconPaint(wapp->app_icon);
                save_appicon(wapp->app_icon, True);
        }
 }
diff --git a/src/appicon.h b/src/appicon.h
index f6eabd6..6f72c8e 100644
--- a/src/appicon.h
+++ b/src/appicon.h
@@ -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 wAppIconDestroy(WAppIcon *aicon);
-void wAppIconPaint(WAppIcon *aicon, Bool update_icon);
+void wAppIconPaint(WAppIcon *aicon);
 void wAppIconMove(WAppIcon *aicon, int x, int y);
 void makeAppIconFor(WApplication * wapp);
 void removeAppIconFor(WApplication * wapp);
diff --git a/src/application.c b/src/application.c
index 274cff6..7c52fa0 100644
--- a/src/application.c
+++ b/src/application.c
@@ -215,7 +215,7 @@ void wApplicationActivate(WApplication *wapp)
 #ifdef NEWAPPICON
        if (wapp->app_icon) {
                wIconSetHighlited(wapp->app_icon->icon, True);
-               wAppIconPaint(wapp->app_icon, False);
+               wAppIconPaint(wapp->app_icon);
        }
 #endif
 }
@@ -225,7 +225,7 @@ void wApplicationDeactivate(WApplication *wapp)
 #ifdef NEWAPPICON
        if (wapp->app_icon) {
                wIconSetHighlited(wapp->app_icon->icon, False);
-               wAppIconPaint(wapp->app_icon, False);
+               wAppIconPaint(wapp->app_icon);
        }
 #endif
 }
diff --git a/src/client.c b/src/client.c
index f21b90c..3287306 100644
--- a/src/client.c
+++ b/src/client.c
@@ -478,9 +478,7 @@ void wClientCheckProperty(WWindow * wwin, XPropertyEvent * 
event)
                                wapp = wApplicationOf(wwin->main_window);
                                if (wapp && wapp->app_icon) {
                                        wIconUpdate(wapp->app_icon->icon);
-                                       /* The icon was updated in wIconUpdate, 
so we don't
-                                        * need update it again here */
-                                       wAppIconPaint(wapp->app_icon, False);
+                                       wAppIconPaint(wapp->app_icon);
                                }
                        }
 
diff --git a/src/defaults.c b/src/defaults.c
index 3c7d6b5..5e48d12 100644
--- a/src/defaults.c
+++ b/src/defaults.c
@@ -1130,9 +1130,7 @@ void wDefaultUpdateIcons(WScreen *scr)
                if ((file && aicon->icon->file && strcmp(file, 
aicon->icon->file) != 0)
                    || (file && !aicon->icon->file)) {
                        wIconChangeImageFile(aicon->icon, file);
-                       /* The image was updated previously at 
wIconChangeImageFile,
-                        * so we don't need update it here again */
-                       wAppIconPaint(aicon, False);
+                       wAppIconPaint(aicon);
                }
                aicon = aicon->next;
        }
diff --git a/src/dock.c b/src/dock.c
index 6c34377..d7d5c53 100644
--- a/src/dock.c
+++ b/src/dock.c
@@ -544,7 +544,7 @@ static void keepIconsCallback(WMenu *menu, WMenuEntry 
*entry)
                                wIconUpdate(aicon->icon);
 
                                /* Paint it */
-                               wAppIconPaint(aicon, False);
+                               wAppIconPaint(aicon);
                        }
                }
                save_appicon(aicon, True);
@@ -1154,7 +1154,7 @@ static void dockIconPaint(WAppIcon *btn)
        if (btn == btn->icon->core->screen_ptr->clip_icon) {
                wClipIconPaint(btn);
        } else {
-               wAppIconPaint(btn, False);
+               wAppIconPaint(btn);
                save_appicon(btn, True);
        }
 }
@@ -1941,7 +1941,7 @@ Bool wDockAttachIcon(WDock *dock, WAppIcon *icon, int x, 
int y, Bool update_icon
                wIconUpdate(icon->icon);
 
        /* Paint it */
-       wAppIconPaint(icon, False);
+       wAppIconPaint(icon);
 
        /* Save it */
        save_appicon(icon, True);
@@ -2092,7 +2092,7 @@ static Bool moveIconBetweenDocks(WDock *src, WDock *dest, 
WAppIcon *icon, int x,
                wIconUpdate(icon->icon);
 
        /* Paint it */
-       wAppIconPaint(icon, False);
+       wAppIconPaint(icon);
 
        return True;
 }
@@ -2169,7 +2169,7 @@ void wDockDetach(WDock *dock, WAppIcon *icon)
                        wIconUpdate(icon->icon);
 
                /* Paint it */
-               wAppIconPaint(icon, False);
+               wAppIconPaint(icon);
 
                if (wPreferences.auto_arrange_icons)
                        wArrangeIcons(dock->screen_ptr, True);
@@ -2916,7 +2916,7 @@ void wDockTrackWindowLaunch(WDock *dock, Window window)
                                        wLowerFrame(aicon->icon->core);
                                XMapWindow(dpy, aicon->icon->core->window);
                                aicon->launching = 1;
-                               wAppIconPaint(aicon, False);
+                               wAppIconPaint(aicon);
                                SlideWindow(aicon->icon->core->window, x0, y0, 
icon->x_pos, icon->y_pos);
                                XUnmapWindow(dpy, aicon->icon->core->window);
                                wAppIconDestroy(aicon);
@@ -3992,7 +3992,7 @@ int wClipMakeIconOmnipresent(WAppIcon *aicon, int 
omnipresent)
                }
        }
 
-       wAppIconPaint(aicon, False);
+       wAppIconPaint(aicon);
 
        return status;
 }
diff --git a/src/dockedapp.c b/src/dockedapp.c
index d14bd3b..6c6d1f0 100644
--- a/src/dockedapp.c
+++ b/src/dockedapp.c
@@ -177,12 +177,10 @@ static void panelBtnCallback(WMWidget * self, void *data)
                } else {
                        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)
                                wClipIconPaint(aicon);
                        else
-                               wAppIconPaint(aicon, False);
+                               wAppIconPaint(aicon);
 
                        wDefaultChangeIcon(panel->wwin->screen_ptr, 
aicon->wm_instance, aicon->wm_class, text);
                }
diff --git a/src/winspector.c b/src/winspector.c
index 808a76f..25e13b2 100644
--- a/src/winspector.c
+++ b/src/winspector.c
@@ -790,9 +790,7 @@ static void applySettings(WMButton *button, InspectorPanel 
*panel)
                        if (file)
                                wfree(file);
 
-                       /* The image was updated in wIconChangeImageFile,
-                        * so we don't need udpate it at wAppIconPaint */
-                       wAppIconPaint(wapp->app_icon, False);
+                       wAppIconPaint(wapp->app_icon);
                }
        }
 
diff --git a/src/wmspec.c b/src/wmspec.c
index 43eb12e..b3dfb8b 100644
--- a/src/wmspec.c
+++ b/src/wmspec.c
@@ -474,8 +474,7 @@ static void updateIconImage(WWindow *wwin)
        WApplication *app = wApplicationOf(wwin->main_window);
        if (app && app->app_icon) {
                wIconUpdate(app->app_icon->icon);
-               /* Icon was updated in wIconUpdate, so we don't need update it 
again */
-               wAppIconPaint(app->app_icon, False);
+               wAppIconPaint(app->app_icon);
        }
 }
 
diff --git a/src/workspace.c b/src/workspace.c
index 6a386c1..7b62798 100644
--- a/src/workspace.c
+++ b/src/workspace.c
@@ -594,7 +594,7 @@ void wWorkspaceForceChange(WScreen * scr, int workspace)
                wArrangeIcons(scr, False);
 
        if (scr->dock)
-               wAppIconPaint(scr->dock->icon_array[0], False);
+               wAppIconPaint(scr->dock->icon_array[0]);
 
        if (scr->clip_icon) {
                if (scr->workspaces[workspace]->clip->auto_collapse ||
-- 
1.7.10.4


-- 
To unsubscribe, send mail to [email protected].

Reply via email to