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 5650b0b93d5d0dbc23e749b55a71562fd3dee94e (commit) via 687faffd77c68155043f12d2ac4905f2f8080cf5 (commit) via 57cb2ab6b3bc2bcf4c05f87cf6a0bb315d5cdbff (commit) via 83bcd62a0f5504b277d5a5b2bcf1ef49ba0b750c (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 (5650b0b93d5d0dbc23e749b55a71562fd3dee94e) N -- N -- N (687faffd77c68155043f12d2ac4905f2f8080cf5) 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/687faffd77c68155043f12d2ac4905f2f8080cf5 commit 687faffd77c68155043f12d2ac4905f2f8080cf5 Author: Carlos R. Mafra <crma...@gmail.com> Date: Thu Jun 21 16:51:12 2012 +0100 Skip no_appicon apps in the application icon list We want to avoid having to consider the position of an appicon whose application has no_appicon set. The appicon is not "painted" so it does not appear on the screen. But if the appicon is still added to the list of application icons, the wArrangeIcons() function gets confused and ends up creating holes in the icon positions which correspond to the no_appicon apps. Signed-off-by: Carlos R. Mafra <crma...@gmail.com> diff --git a/src/appicon.c b/src/appicon.c index d236313..594721c 100644 --- a/src/appicon.c +++ b/src/appicon.c @@ -248,12 +248,17 @@ static WAppIcon *wAppIconCreate(WWindow * leader_win) aicon->yindex = -1; aicon->xindex = -1; - aicon->prev = NULL; - aicon->next = scr->app_icon_list; - if (scr->app_icon_list) - scr->app_icon_list->prev = aicon; - - scr->app_icon_list = aicon; + /* When no_appicon is set we want to avoid having it on the list + * because otherwise there will be a hole when the icons are + * arranged with wArrangeIcons() */ + if (!WFLAGP(leader_win, no_appicon)) { + aicon->prev = NULL; + aicon->next = scr->app_icon_list; + if (scr->app_icon_list) + scr->app_icon_list->prev = aicon; + + scr->app_icon_list = aicon; + } if (leader_win->wm_class) aicon->wm_class = wstrdup(leader_win->wm_class); http://repo.or.cz/w/wmaker-crm.git/commit/57cb2ab6b3bc2bcf4c05f87cf6a0bb315d5cdbff commit 57cb2ab6b3bc2bcf4c05f87cf6a0bb315d5cdbff Author: Carlos R. Mafra <crma...@gmail.com> Date: Thu Jun 21 15:16:20 2012 +0100 Unify save_appicon() and wAppIconSave() Having two similarly named functions for doing the same thing is confusing. In order to account for the extra check done by the late wAppIconSave(), add an argument "dock". Now there's only save_appicon(). Signed-off-by: Carlos R. Mafra <crma...@gmail.com> diff --git a/src/appicon.c b/src/appicon.c index 6827c2f..d236313 100644 --- a/src/appicon.c +++ b/src/appicon.c @@ -68,6 +68,7 @@ static void iconDblClick(WObjDescriptor * desc, XEvent * event); static void iconExpose(WObjDescriptor * desc, XEvent * event); static void wApplicationSaveIconPathFor(char *iconPath, char *wm_instance, char *wm_class); static WAppIcon *wAppIconCreate(WWindow * leader_win); +static void save_appicon_core(WAppIcon *aicon); /* This function is used if the application is a .app. It checks if it has an icon in it * like for example /usr/local/GNUstep/Applications/WPrefs.app/WPrefs.tiff @@ -397,8 +398,20 @@ void wAppIconPaint(WAppIcon * aicon) 0, 0, wPreferences.icon_size, wPreferences.icon_size); } +/* Save the application icon, if it's a dockapp then use it with dock = True */ +void save_appicon(WAppIcon *aicon, Bool dock) +{ + if (!aicon) + return; + + if (dock && (!aicon->docked || aicon->attracted)) + return; + + save_appicon_core(aicon); +} + /* Internal application to save the application icon */ -static void save_app_icon_core(WAppIcon *aicon) +static void save_appicon_core(WAppIcon *aicon) { char *path; @@ -411,16 +424,6 @@ static void save_app_icon_core(WAppIcon *aicon) wfree(path); } -/* Save the application icon */ -/* This function is used when the icon doesn't have window, like dock or clip */ -void wAppIconSave(WAppIcon *aicon) -{ - if (!aicon->docked || aicon->attracted) - return; - - save_app_icon_core(aicon); -} - #define canBeDocked(wwin) ((wwin) && ((wwin)->wm_class||(wwin)->wm_instance)) /* main_window may not have the full command line; try to find one which does */ @@ -930,16 +933,6 @@ static void wApplicationSaveIconPathFor(char *iconPath, char *wm_instance, char UpdateDomainFile(WDWindowAttributes); } -/* Save the application icon */ -/* This function is used by normal windows */ -void save_app_icon(WApplication *wapp) -{ - if (!wapp->app_icon) - return; - - save_app_icon_core(wapp->app_icon); -} - static WAppIcon *findDockIconFor(WDock *dock, Window main_window) { WAppIcon *aicon = NULL; @@ -987,6 +980,6 @@ void create_appicon_from_dock(WWindow *wwin, WApplication *wapp, Window main_win wapp->app_icon->icon->icon_win = mainw->wm_hints->icon_window; wAppIconPaint(wapp->app_icon); - wAppIconSave(wapp->app_icon); + save_appicon(wapp->app_icon, True); } } diff --git a/src/appicon.h b/src/appicon.h index ec01493..1fbd976 100644 --- a/src/appicon.h +++ b/src/appicon.h @@ -78,7 +78,6 @@ void wAppIconPaint(WAppIcon *aicon); void wAppIconMove(WAppIcon *aicon, int x, int y); void makeAppIconFor(WApplication * wapp); void removeAppIconFor(WApplication * wapp); -void save_app_icon(WApplication *wapp); +void save_appicon(WAppIcon *aicon, Bool dock); void paint_app_icon(WApplication *wapp); -void wAppIconSave(WAppIcon *aicon); #endif diff --git a/src/application.c b/src/application.c index f08f435..4e34f35 100644 --- a/src/application.c +++ b/src/application.c @@ -151,7 +151,7 @@ WApplication *wApplicationCreate(WWindow * wwin) makeAppIconFor(wapp); /* Save the app_icon in a file */ - save_app_icon(wapp); + save_appicon(wapp->app_icon, False); return wapp; } diff --git a/src/dock.c b/src/dock.c index 155e1a8..0332d65 100644 --- a/src/dock.c +++ b/src/dock.c @@ -548,7 +548,7 @@ static void keepIconsCallback(WMenu *menu, WMenuEntry *entry) wAppIconPaint(aicon); } } - wAppIconSave(aicon); + save_appicon(aicon, True); } WMFreeArray(selectedIcons); } @@ -1173,7 +1173,7 @@ static void dockIconPaint(WAppIcon *btn) wClipIconPaint(btn); else { wAppIconPaint(btn); - wAppIconSave(btn); + save_appicon(btn, True); } } @@ -1961,7 +1961,7 @@ Bool wDockAttachIcon(WDock *dock, WAppIcon *icon, int x, int y) MoveInStackListUnder(dock->icon_array[index - 1]->icon->core, icon->icon->core); wAppIconMove(icon, icon->x_pos, icon->y_pos); wAppIconPaint(icon); - wAppIconSave(icon); + save_appicon(icon, True); if (wPreferences.auto_arrange_icons) wArrangeIcons(dock->screen_ptr, True); @@ -2089,7 +2089,7 @@ static Bool moveIconBetweenDocks(WDock *src, WDock *dest, WAppIcon *icon, int x, icon->icon->shadowed = 0; icon->icon->force_paint = 1; } - wAppIconSave(icon); + save_appicon(icon, True); } if (src->auto_collapse || src->auto_raise_lower) http://repo.or.cz/w/wmaker-crm.git/commit/83bcd62a0f5504b277d5a5b2bcf1ef49ba0b750c commit 83bcd62a0f5504b277d5a5b2bcf1ef49ba0b750c Author: Carlos R. Mafra <crma...@gmail.com> Date: Thu Jun 21 15:06:22 2012 +0100 Make create_appicon_from_dock() do only what its name implies Function names are important and should not do more than their names imply. In this case, create_appicon_from_dock() should only try to get an icon from the dock (or clip). If the icon is not there, do not try to make an icon from scratch. You were told to create it from the dock! Signed-off-by: Carlos R. Mafra <crma...@gmail.com> diff --git a/src/appicon.c b/src/appicon.c index 6cc2bca..6827c2f 100644 --- a/src/appicon.c +++ b/src/appicon.c @@ -955,8 +955,6 @@ static WAppIcon *findDockIconFor(WDock *dock, Window main_window) void create_appicon_from_dock(WWindow *wwin, WApplication *wapp, Window main_window) { WScreen *scr = wwin->screen_ptr; - - /* Create the application icon */ wapp->app_icon = NULL; if (scr->last_dock) @@ -990,7 +988,5 @@ void create_appicon_from_dock(WWindow *wwin, WApplication *wapp, Window main_win wAppIconPaint(wapp->app_icon); wAppIconSave(wapp->app_icon); - } else { - makeAppIconFor(wapp); } } diff --git a/src/application.c b/src/application.c index f0122f0..f08f435 100644 --- a/src/application.c +++ b/src/application.c @@ -132,22 +132,24 @@ WApplication *wApplicationCreate(WWindow * wwin) #ifdef USER_MENU if (!wapp->menu) wapp->menu = wUserMenuGet(scr, wapp->main_window_desc); -#endif /* USER_MENU */ +#endif - /* - * Set application wide attributes from the leader. - */ + /* Set application wide attributes from the leader */ wapp->flags.hidden = WFLAGP(wapp->main_window_desc, start_hidden); wapp->flags.emulated = WFLAGP(wapp->main_window_desc, emulate_appicon); /* application descriptor */ XSaveContext(dpy, main_window, wAppWinContext, (XPointer) wapp); - /* Create the application icon using the icon from docks - * If not found in docks, create a new icon - * using the function wAppIconCreate() */ + /* First try to create an icon from the dock or clip */ create_appicon_from_dock(wwin, wapp, main_window); + /* + * In case it was not found in the dock, make it from scratch. + * Note: makeAppIconFor() returns early if wapp->app_icon exists + */ + makeAppIconFor(wapp); + /* Save the app_icon in a file */ save_app_icon(wapp); ----------------------------------------------------------------------- Summary of changes: src/appicon.c | 55 +++++++++++++++++++++++++--------------------------- src/appicon.h | 3 +- src/application.c | 28 ++++++++++---------------- src/dock.c | 8 +++--- 4 files changed, 42 insertions(+), 52 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.