wAppIconPaint argument removed
authorRodolfo García Peñas (kix) <kix@kix.es>
Sat, 10 Nov 2012 19:25:14 +0000 (10 20:25 +0100)
committerCarlos R. Mafra <crmafra@gmail.com>
Sun, 11 Nov 2012 11:59:41 +0000 (11 11:59 +0000)
This patch removes the wAppIconPaint() Bool flag, because now it is
always False.

src/actions.c
src/appicon.c
src/appicon.h
src/application.c
src/client.c
src/defaults.c
src/dock.c
src/dockedapp.c
src/winspector.c
src/wmspec.c
src/workspace.c

index e168c56..7dceaff 100644 (file)
@@ -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
 }
 
index 8e8c22b..329bd6e 100644 (file)
@@ -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);
        }
 }
index f6eabd6..6f72c8e 100644 (file)
@@ -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);
index 274cff6..7c52fa0 100644 (file)
@@ -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
 }
index f21b90c..3287306 100644 (file)
@@ -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);
                                }
                        }
 
index 3c7d6b5..5e48d12 100644 (file)
@@ -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;
        }
index 6c34377..d7d5c53 100644 (file)
@@ -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;
 }
index d14bd3b..6c6d1f0 100644 (file)
@@ -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);
                }
index 808a76f..25e13b2 100644 (file)
@@ -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);
                }
        }
 
index 43eb12e..b3dfb8b 100644 (file)
@@ -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);
        }
 }
 
index 6a386c1..7b62798 100644 (file)
@@ -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 ||