This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project wmaker-crm.git.

The branch, next has been updated
  discards  0b5de80e20ec81ce00f6d7ede5f894ea13929163 (commit)
       via  7a2eb68aa47a35eede44457db5d300719be4dcdd (commit)
       via  8a822004eef716d3a154a78960773d52d9cc8253 (commit)
       via  54db8d6c43e23ec0404875a7e2d0a1454659bd9a (commit)
       via  e11800652ea226528088bcbfd74677fce233600e (commit)
       via  b2c507898764bf33abc017675dda44ae31533812 (commit)
       via  9c4b19d8aaee2f80f03853e62c753298edf12ceb (commit)
       via  b2815873977e364d3fd8f27b4dae82c37a23bad6 (commit)

This update added new revisions after undoing existing revisions.  That is
to say, the old revision is not a strict subset of the new revision.  This
situation occurs when you --force push a change and generate a repository
containing something like this:

 * -- * -- B -- O -- O -- O (0b5de80e20ec81ce00f6d7ede5f894ea13929163)
            \
             N -- N -- N (7a2eb68aa47a35eede44457db5d300719be4dcdd)

When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://repo.or.cz/w/wmaker-crm.git/commit/7a2eb68aa47a35eede44457db5d300719be4dcdd

commit 7a2eb68aa47a35eede44457db5d300719be4dcdd
Author: Rodolfo García Peñas (kix) <k...@kix.es>
Date:   Sun Aug 23 20:56:59 2015 +0200

    Remove cache icon when detached
    
    This pach removes the icon from the icon cache when the icon is
    detached from the dock/clip.
    
    That helps to hold tidy the icon cache folder.
    
    -------8<-------
    Also app icon caching was broken around the same time. The app icon cache
    in CachedPixmaps was meant to store icons retrieved from X clients so the
    dock or clip can display those when the client is not running like after
    startup. The cache should contain only such icons and the path should never
    appear in WMWindowAttributes because the cache is an internal thing used to
    look up icons not otherwise available. If you look at your 
WMWindowAttributes
    now it is full of entries referring to the cache that should not be there 
and
    if you look at the cache dir you'll find a lot of icons from all apps you've
    ever started while there should be only the few docked ones that use client
    side icons. Also the cache is never cleaned up only new icons are added to 
it.
    -------8<-------
    
    Signed-off-by: Rodolfo García Peñas (kix) <k...@kix.es>

diff --git a/src/dock.c b/src/dock.c
index e27b28a..3b3313b 100644
--- a/src/dock.c
+++ b/src/dock.c
@@ -2425,6 +2425,9 @@ void wDockDetach(WDock *dock, WAppIcon *icon)
 
        dock->icon_count--;
 
+       /* Remove the Cached Icon */
+       remove_cache_icon(icon->icon->file);
+
        /* if the dock is not attached to an application or
         * the application did not set the appropriate hints yet,
         * destroy the icon */
@@ -2452,6 +2455,7 @@ void wDockDetach(WDock *dock, WAppIcon *icon)
                if (wPreferences.auto_arrange_icons)
                        wArrangeIcons(dock->screen_ptr, True);
        }
+
        if (dock->auto_collapse || dock->auto_raise_lower)
                clipLeave(dock);
 }
diff --git a/src/icon.c b/src/icon.c
index d53f756..0dbd6ac 100644
--- a/src/icon.c
+++ b/src/icon.c
@@ -529,6 +529,24 @@ char *wIconStore(WIcon *icon)
        return filename;
 }
 
+void remove_cache_icon(char *filename)
+{
+       char *cachepath;
+
+       if (!filename)
+               return;
+
+       cachepath = get_icon_cache_path();
+       if (!cachepath)
+               return;
+
+       /* Filename check/parse could be here */
+       if (!strncmp(filename, cachepath, strlen(cachepath)))
+               unlink(filename);
+
+       wfree(cachepath);
+}
+
 static void cycleColor(void *data)
 {
        WIcon *icon = (WIcon *) data;
diff --git a/src/icon.h b/src/icon.h
index dbcb289..cccd7a8 100644
--- a/src/icon.h
+++ b/src/icon.h
@@ -80,4 +80,5 @@ void wIconSetHighlited(WIcon *icon, Bool flag);
 void set_icon_image_from_image(WIcon *icon, RImage *image);
 void set_icon_minipreview(WIcon *icon, RImage *image);
 
+void remove_cache_icon(char *filename);
 #endif /* WMICON_H_ */

http://repo.or.cz/w/wmaker-crm.git/commit/8a822004eef716d3a154a78960773d52d9cc8253

commit 8a822004eef716d3a154a78960773d52d9cc8253
Author: Rodolfo García Peñas (kix) <k...@kix.es>
Date:   Sun Aug 23 20:56:58 2015 +0200

    save the icon filename instead the full path
    
    This patch saves the icon filename in the database and in the disk. wmaker
    can find the icon in the different folders, including the cache folder.
    
    This patch is based in the comments of Zoltan:
    
    -------8<-------
    Also app icon caching was broken around the same time. The app icon cache
    in CachedPixmaps was meant to store icons retrieved from X clients so the
    dock or clip can display those when the client is not running like after
    startup. The cache should contain only such icons and the path should never
    appear in WMWindowAttributes because the cache is an internal thing used to
    look up icons not otherwise available. If you look at your 
WMWindowAttributes
    now it is full of entries referring to the cache that should not be there 
and
    if you look at the cache dir you'll find a lot of icons from all apps you've
    ever started while there should be only the few docked ones that use client
    side icons. Also the cache is never cleaned up only new icons are added to 
it.
    -------8<-------
    
    Signed-off-by: Rodolfo García Peñas (kix) <k...@kix.es>

diff --git a/src/icon.c b/src/icon.c
index a04e11b..d53f756 100644
--- a/src/icon.c
+++ b/src/icon.c
@@ -470,7 +470,7 @@ static RImage *get_wwindow_image_from_wmhints(WWindow 
*wwin, WIcon *icon)
  */
 char *wIconStore(WIcon *icon)
 {
-       char *path, *dir_path, *file;
+       char *path, *dir_path, *file, *filename;
        int len = 0;
        RImage *image = NULL;
        WWindow *wwin = icon->owner;
@@ -488,15 +488,23 @@ char *wIconStore(WIcon *icon)
                return NULL;
        }
 
-       len = strlen(dir_path) + strlen(file) + 5;
+       /* Create the file name */
+       len = strlen(file) + 5;
+       filename = wmalloc(len);
+       snprintf(filename, len, "%s.xpm", file);
+       wfree(file);
+
+       /* Create the full path, including the filename */
+       len = strlen(dir_path) + strlen(filename) + 1;
        path = wmalloc(len);
-       snprintf(path, len, "%s%s.xpm", dir_path, file);
+       snprintf(path, len, "%s%s", dir_path, filename);
        wfree(dir_path);
-       wfree(file);
 
        /* If icon exists, exit */
-       if (access(path, F_OK) == 0)
-               return path;
+       if (access(path, F_OK) == 0) {
+               wfree(path);
+               return filename;
+       }
 
        if (wwin->net_icon_image)
                image = RRetainImage(wwin->net_icon_image);
@@ -505,17 +513,20 @@ char *wIconStore(WIcon *icon)
 
        if (!image) {
                wfree(path);
+               wfree(filename);
                return NULL;
        }
 
        if (!RSaveImage(image, path, "XPM")) {
                wfree(path);
+               wfree(filename);
                path = NULL;
        }
 
+       wfree(path);
        RReleaseImage(image);
 
-       return path;
+       return filename;
 }
 
 static void cycleColor(void *data)

http://repo.or.cz/w/wmaker-crm.git/commit/54db8d6c43e23ec0404875a7e2d0a1454659bd9a

commit 54db8d6c43e23ec0404875a7e2d0a1454659bd9a
Author: Rodolfo García Peñas (kix) <k...@kix.es>
Date:   Sun Aug 23 20:56:57 2015 +0200

    Avoid create again a docked application cache icon
    
    This patch avoids to create again the cache icon for a docked application.
    If the application is docked, then the icon was previosly created.
    
    Signed-off-by: Rodolfo García Peñas (kix) <k...@kix.es>

diff --git a/src/appicon.c b/src/appicon.c
index 9028d0e..8eb668f 100644
--- a/src/appicon.c
+++ b/src/appicon.c
@@ -1190,7 +1190,6 @@ static void create_appicon_from_dock(WWindow *wwin, 
WApplication *wapp, Window m
 
                /* Paint it */
                wAppIconPaint(wapp->app_icon);
-               save_appicon(wapp->app_icon);
        }
 }
 

http://repo.or.cz/w/wmaker-crm.git/commit/e11800652ea226528088bcbfd74677fce233600e

commit e11800652ea226528088bcbfd74677fce233600e
Author: Rodolfo García Peñas (kix) <k...@kix.es>
Date:   Sun Aug 23 20:56:56 2015 +0200

    Avoid recreate Cached icon moving between docks
    
    This patch avoids to create again the icon in the Cache if the icon
    was in other Dock/Clip/Drawer, becasue the icon was previously created
    and exits.
    
    Signed-off-by: Rodolfo García Peñas (kix) <k...@kix.es>

diff --git a/src/dock.c b/src/dock.c
index fce3f5b..e27b28a 100644
--- a/src/dock.c
+++ b/src/dock.c
@@ -2344,7 +2344,6 @@ Bool wDockMoveIconBetweenDocks(WDock *src, WDock *dest, 
WAppIcon *icon, int x, i
                        icon->icon->shadowed = 0;
                        update_icon = True;
                }
-               save_appicon(icon);
        }
 
        if (src->auto_collapse || src->auto_raise_lower)

http://repo.or.cz/w/wmaker-crm.git/commit/b2c507898764bf33abc017675dda44ae31533812

commit b2c507898764bf33abc017675dda44ae31533812
Author: Rodolfo García Peñas (kix) <k...@kix.es>
Date:   Sun Aug 23 20:56:55 2015 +0200

    Remove unused argument in save_appicon
    
    The argument dock is always True, so can be removed.
    
    Signed-off-by: Rodolfo García Peñas (kix) <k...@kix.es>

diff --git a/src/appicon.c b/src/appicon.c
index 2a9db5c..9028d0e 100644
--- a/src/appicon.c
+++ b/src/appicon.c
@@ -433,14 +433,14 @@ void wAppIconPaint(WAppIcon *aicon)
 }
 
 /* Save the application icon, if it's a dockapp then use it with dock = True */
-void save_appicon(WAppIcon *aicon, Bool dock)
+void save_appicon(WAppIcon *aicon)
 {
        char *path;
 
        if (!aicon)
                return;
 
-       if (dock && (!aicon->docked || aicon->attracted))
+       if (!aicon->docked || aicon->attracted)
                return;
 
        path = wIconStore(aicon->icon);
@@ -1190,7 +1190,7 @@ static void create_appicon_from_dock(WWindow *wwin, 
WApplication *wapp, Window m
 
                /* Paint it */
                wAppIconPaint(wapp->app_icon);
-               save_appicon(wapp->app_icon, True);
+               save_appicon(wapp->app_icon);
        }
 }
 
diff --git a/src/appicon.h b/src/appicon.h
index eb1904b..44913b8 100644
--- a/src/appicon.h
+++ b/src/appicon.h
@@ -78,7 +78,7 @@ void wAppIconPaint(WAppIcon *aicon);
 void wAppIconMove(WAppIcon *aicon, int x, int y);
 void create_appicon_for_application(WApplication *wapp, WWindow *wwin);
 void removeAppIconFor(WApplication * wapp);
-void save_appicon(WAppIcon *aicon, Bool dock);
+void save_appicon(WAppIcon *aicon);
 void paint_app_icon(WApplication *wapp);
 void unpaint_app_icon(WApplication *wapp);
 void wApplicationExtractDirPackIcon(const char *path, const char *wm_instance,
diff --git a/src/dock.c b/src/dock.c
index 99c137a..fce3f5b 100644
--- a/src/dock.c
+++ b/src/dock.c
@@ -583,7 +583,7 @@ static void keepIconsCallback(WMenu *menu, WMenuEntry 
*entry)
                                wAppIconPaint(aicon);
                        }
                }
-               save_appicon(aicon, True);
+               save_appicon(aicon);
        }
        WMFreeArray(selectedIcons);
 }
@@ -1445,7 +1445,7 @@ static void dockIconPaint(WAppIcon *btn)
                wDrawerIconPaint(btn);
        } else {
                wAppIconPaint(btn);
-               save_appicon(btn, True);
+               save_appicon(btn);
        }
 }
 
@@ -2219,7 +2219,7 @@ Bool wDockAttachIcon(WDock *dock, WAppIcon *icon, int x, 
int y, Bool update_icon
        wAppIconPaint(icon);
 
        /* Save it */
-       save_appicon(icon, True);
+       save_appicon(icon);
 
        if (wPreferences.auto_arrange_icons)
                wArrangeIcons(dock->screen_ptr, True);
@@ -2344,7 +2344,7 @@ Bool wDockMoveIconBetweenDocks(WDock *src, WDock *dest, 
WAppIcon *icon, int x, i
                        icon->icon->shadowed = 0;
                        update_icon = True;
                }
-               save_appicon(icon, True);
+               save_appicon(icon);
        }
 
        if (src->auto_collapse || src->auto_raise_lower)

http://repo.or.cz/w/wmaker-crm.git/commit/9c4b19d8aaee2f80f03853e62c753298edf12ceb

commit 9c4b19d8aaee2f80f03853e62c753298edf12ceb
Author: Rodolfo García Peñas (kix) <k...@kix.es>
Date:   Sun Aug 23 20:56:54 2015 +0200

    New applications do not create Cached Icon
    
    This patch avoids to create Cached Icons for all applications. Only
    the applications docked should create it, as Zoltan said:
    
    -------8<-------
    Also app icon caching was broken around the same time. The app icon cache
    in CachedPixmaps was meant to store icons retrieved from X clients so the
    dock or clip can display those when the client is not running like after
    startup. The cache should contain only such icons and the path should never
    appear in WMWindowAttributes because the cache is an internal thing used to
    look up icons not otherwise available. If you look at your 
WMWindowAttributes
    now it is full of entries referring to the cache that should not be there 
and
    if you look at the cache dir you'll find a lot of icons from all apps you've
    ever started while there should be only the few docked ones that use client
    side icons. Also the cache is never cleaned up only new icons are added to 
it.
    -------8<-------
    
    Signed-off-by: Rodolfo García Peñas (kix) <k...@kix.es>

diff --git a/src/appicon.c b/src/appicon.c
index 08331c7..2a9db5c 100644
--- a/src/appicon.c
+++ b/src/appicon.c
@@ -159,9 +159,6 @@ void create_appicon_for_application(WApplication *wapp, 
WWindow *wwin)
                if (!WFLAGP(wapp->main_window_desc, no_appicon))
                        paint_app_icon(wapp);
        }
-
-       /* Save the app_icon in a file */
-       save_appicon(wapp->app_icon, False);
 }
 
 void unpaint_app_icon(WApplication *wapp)

http://repo.or.cz/w/wmaker-crm.git/commit/b2815873977e364d3fd8f27b4dae82c37a23bad6

commit b2815873977e364d3fd8f27b4dae82c37a23bad6
Author: Rodolfo García Peñas (kix) <k...@kix.es>
Date:   Sun Aug 23 20:56:53 2015 +0200

    create_appicon_from_dock checks if no_appicon flag is set
    
    As Josip Deanovic reported:
    
    -------8<-------
    In previous versions e.g. 0.80.2 up until 0.95.3 when an application
    attributes are set with "NoAppIcon = Yes;" ("No application icon" option
    in attributes window), it was possible to launch multiple instances of
    the application from wmdock using double-click.
    
    After doing a git bisect per your suggestion I have found and reported
    this:
    
    bc0700e016c67791d3e3eab855543d849f4ce786 is the first bad commit
    commit bc0700e016c67791d3e3eab855543d849f4ce786
    Author: Rodolfo García Peñas (kix) <k...@kix.es>
    Date:   Mon Jun 18 11:15:19 2012 +0200
    
        Create WAppIcon always
    
        When the application is created, the WAppIcon now is created always,
        but it is only painted if the flag is not set.
    
        The icon initialization to NULL can be done now at
    app_icon_create_from_docks
        because it is always called.
    
    :040000 040000 7c58877ad5af211acaddac5288848c2ade7b04cb
    33d52affb385d22fbf04ebad3c628b714008785d M      src
    -------8<-------
    
    This patch reverts this change (not the patch). Now the function
    create_appicon_from_dock checks if the flag no_appicon is set,
    and then, do not execute the code related to the appicon.
    
    Because the connection between the icon and the window is broken
    (icon->owner is null) we need check if the icon->owner exists
    when we try to re-create the icon in the Window Attributes window.
    
    Signed-off-by: Rodolfo García Peñas (kix) <k...@kix.es>

diff --git a/src/appicon.c b/src/appicon.c
index 302066d..08331c7 100644
--- a/src/appicon.c
+++ b/src/appicon.c
@@ -1180,7 +1180,7 @@ static void create_appicon_from_dock(WWindow *wwin, 
WApplication *wapp, Window m
        }
 
        /* If created, then set some flags */
-       if (wapp->app_icon) {
+       if (wapp->app_icon && !WFLAGP(wapp->main_window_desc, no_appicon)) {
                WWindow *mainw = wapp->main_window_desc;
 
                wapp->app_icon->running = 1;
diff --git a/src/icon.c b/src/icon.c
index 721c428..a04e11b 100644
--- a/src/icon.c
+++ b/src/icon.c
@@ -748,7 +748,12 @@ RImage *get_rimage_icon_from_wm_hints(WIcon *icon)
 {
        RImage *image = NULL;
        unsigned int w, h, d;
-       WWindow *wwin = icon->owner;
+       WWindow *wwin;
+
+       if ((!icon) || (!icon->owner))
+               return NULL;
+
+       wwin = icon->owner;
 
        if (!getSize(wwin->wm_hints->icon_pixmap, &w, &h, &d)) {
                icon->owner->wm_hints->flags &= ~IconPixmapHint;

-----------------------------------------------------------------------

Summary of changes:
 src/appicon.c |  8 ++------
 src/appicon.h |  2 +-
 src/dock.c    | 11 +++++++----
 src/icon.c    | 50 ++++++++++++++++++++++++++++++++++++++++++--------
 src/icon.h    |  1 +
 5 files changed, 53 insertions(+), 19 deletions(-)


repo.or.cz automatic notification. Contact project admin crma...@gmail.com
if you want to unsubscribe, or site admin ad...@repo.or.cz if you receive
no reply.
-- 
wmaker-crm.git ("The Window Maker window manager")


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.

Reply via email to