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 via 2165faec5d368f66d6172c34c75e43b71aa3db6a (commit) via 3f2c87fb06487072444f856cd609122686b7edf3 (commit) via 5bfac9036dd9c4fac3075e365155a97feb54ff42 (commit) via 0a06ddd9e3398749007deddf392d255f04347822 (commit) via 4b4c5513ce744562d716e3d883410a2773e342e1 (commit) via 522d84b0ef94a53e37f236bb4864b34d57eac0e5 (commit) from faa74a14b1f01a343bf3f183e2515dcff2ecc006 (commit) 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/2165faec5d368f66d6172c34c75e43b71aa3db6a commit 2165faec5d368f66d6172c34c75e43b71aa3db6a Author: Rodolfo GarcÃa Peñas (kix) <k...@kix.es> Date: Thu Nov 15 00:59:34 2012 +0100 applySettings icon set updated The function applySettings() set now the icons. Updated icons are: - Appicon: Always, with or without always_user_icon - Window: If the window is minimized, with or without always_user_icon. Window must be minimized to see the icon change, else, wwin->icon doesn't exist and therefore you won't see this change (no icon). There is a problem if the window is not minimized and is minimezed, because it will show the icon in the database, not the assigned icon. This problem must be updated not here, in the wIconifyWindow() function, at actions.c diff --git a/src/winspector.c b/src/winspector.c index 25e13b2..d3f49d0 100644 --- a/src/winspector.c +++ b/src/winspector.c @@ -778,20 +778,32 @@ static void applySettings(WMButton *button, InspectorPanel *panel) else paint_app_icon(wapp); - if (wapp->app_icon && wapp->main_window == wwin->client_win) { - char *file = WMGetTextFieldText(panel->fileText); + char *file = WMGetTextFieldText(panel->fileText); + if (file[0] == 0) { + wfree(file); + file = NULL; + } - if (file[0] == 0) { - wfree(file); - file = NULL; - } + if (WFLAGP(wwin, always_user_icon)) { + /* Change icon image if the app is minimized */ + if (wwin->icon) + wIconChangeImageFile(wwin->icon, file); - wIconChangeImageFile(wapp->app_icon->icon, file); - if (file) - wfree(file); + /* Change App Icon image */ + if (wapp->app_icon) + wIconChangeImageFile(wapp->app_icon->icon, file); + } else { + /* Change App Icon image */ + if (wapp->app_icon) + wIconUpdate(wapp->app_icon->icon, get_rimage_icon_from_wm_hints(wapp->app_icon->icon)); - wAppIconPaint(wapp->app_icon); + /* Change icon image if the app is minimized */ + if (wwin->icon) + wIconUpdate(wwin->icon, get_rimage_icon_from_wm_hints(wwin->icon)); } + + if (file) + wfree(file); } wNETFrameExtents(wwin); http://repo.or.cz/w/wmaker-crm.git/commit/3f2c87fb06487072444f856cd609122686b7edf3 commit 3f2c87fb06487072444f856cd609122686b7edf3 Author: Rodolfo GarcÃa Peñas (kix) <k...@kix.es> Date: Thu Nov 15 00:44:00 2012 +0100 get_rimage_icon_from_wm_hints returns image The function get_rimage_icon_from_wm_hints now returns an image. diff --git a/src/icon.c b/src/icon.c index f1f9c67..13a0c94 100644 --- a/src/icon.c +++ b/src/icon.c @@ -62,7 +62,6 @@ static WIcon *icon_create_core(WScreen *scr, int coord_x, int coord_y); static void set_dockapp_in_icon(WIcon *icon); static void get_rimage_icon_from_icon_win(WIcon *icon); -static int get_rimage_icon_from_wm_hints(WIcon *icon); static void get_rimage_icon_from_user_icon(WIcon *icon); static void get_rimage_icon_from_default_icon(WIcon *icon); static void get_rimage_icon_from_x11(WIcon *icon); @@ -617,7 +616,9 @@ void wIconUpdate(WIcon *icon, RImage *image) get_rimage_icon_from_x11(icon); } else if (wwin && wwin->wm_hints && (wwin->wm_hints->flags & IconPixmapHint)) { /* Get the Pixmap from the wm_hints, else, from the user */ - if (get_rimage_icon_from_wm_hints(icon)) + unset_icon_image(icon); + icon->file_image = get_rimage_icon_from_wm_hints(icon); + if (!icon->file_image) get_rimage_icon_from_user_icon(icon); } else { /* Get the Pixmap from the user */ @@ -746,7 +747,7 @@ static void set_dockapp_in_icon(WIcon *icon) } /* Get the RImage from the XWindow wm_hints */ -static int get_rimage_icon_from_wm_hints(WIcon *icon) +RImage *get_rimage_icon_from_wm_hints(WIcon *icon) { RImage *image = NULL; unsigned int w, h, d; @@ -754,20 +755,17 @@ static int get_rimage_icon_from_wm_hints(WIcon *icon) if (!getSize(wwin->wm_hints->icon_pixmap, &w, &h, &d)) { icon->owner->wm_hints->flags &= ~IconPixmapHint; - return 1; + return NULL; } image = get_wwindow_image_from_wmhints(wwin, icon); if (!image) - return 1; + return NULL; /* Resize the icon to the wPreferences.icon_size size */ image = wIconValidateIconSize(image, wPreferences.icon_size); - unset_icon_image(icon); - icon->file_image = image; - - return 0; + return image; } void wIconPaint(WIcon *icon) diff --git a/src/icon.h b/src/icon.h index 74e6211..c2a6b09 100644 --- a/src/icon.h +++ b/src/icon.h @@ -66,6 +66,7 @@ void update_icon_pixmap(WIcon *icon); Bool wIconChangeImageFile(WIcon *icon, char *file); RImage *wIconValidateIconSize(RImage *icon, int max_size); +RImage *get_rimage_icon_from_wm_hints(WIcon *icon); char *wIconStore(WIcon *icon); char *get_name_for_instance_class(char *wm_instance, char *wm_class); http://repo.or.cz/w/wmaker-crm.git/commit/5bfac9036dd9c4fac3075e365155a97feb54ff42 commit 5bfac9036dd9c4fac3075e365155a97feb54ff42 Author: Rodolfo GarcÃa Peñas (kix) <k...@kix.es> Date: Thu Nov 15 00:56:26 2012 +0100 wIconChangeImageFile set the file image The function wIconChangeImageFile set the file_image variable directly, now the code is faster and the assigned image is used. Before this patch, the assigned file couldn't be used, because wIconUpdate serached the icon using different methods. diff --git a/src/icon.c b/src/icon.c index e745619..f1f9c67 100644 --- a/src/icon.c +++ b/src/icon.c @@ -398,9 +398,8 @@ Bool wIconChangeImageFile(WIcon *icon, char *file) unset_icon_image(icon); /* Set the new image */ - icon->file_image = image; icon->file = wstrdup(path); - wIconUpdate(icon, NULL); + wIconUpdate(icon, image); } else { error = 1; } http://repo.or.cz/w/wmaker-crm.git/commit/0a06ddd9e3398749007deddf392d255f04347822 commit 0a06ddd9e3398749007deddf392d255f04347822 Author: Rodolfo GarcÃa Peñas (kix) <k...@kix.es> Date: Thu Nov 15 00:53:03 2012 +0100 wIconUpdate wwin checks The variable wwin is only used in one block of the if, so should be moved inside this block. OTOH, is better check if the variabl exists before assign it. The code now is more stable and avoid crashes. diff --git a/src/icon.c b/src/icon.c index 0edf53c..e745619 100644 --- a/src/icon.c +++ b/src/icon.c @@ -599,11 +599,14 @@ static void unset_icon_image(WIcon *icon) void wIconUpdate(WIcon *icon, RImage *image) { - WWindow *wwin = icon->owner; + WWindow *wwin = NULL; if (image) { icon->file_image = image; } else { + if (icon && icon->owner) + wwin = icon->owner; + if (wwin && WFLAGP(wwin, always_user_icon)) { /* Forced use user_icon */ get_rimage_icon_from_user_icon(icon); http://repo.or.cz/w/wmaker-crm.git/commit/4b4c5513ce744562d716e3d883410a2773e342e1 commit 4b4c5513ce744562d716e3d883410a2773e342e1 Author: Rodolfo GarcÃa Peñas (kix) <k...@kix.es> Date: Sat Nov 17 18:49:50 2012 +0100 update_icon_pixmap don't paint dock icon The dock applications has their icon image set in icon->file_image to draw the icon if the application is not running. But if the application is running, the icon mustn't be show. This patch don't paint the icon for docks. diff --git a/src/icon.c b/src/icon.c index e336793..0edf53c 100644 --- a/src/icon.c +++ b/src/icon.c @@ -640,7 +640,7 @@ void update_icon_pixmap(WIcon *icon) /* If dockapp, put inside the icon */ if (icon->icon_win != None) { /* file_image is NULL, because is docked app */ - icon_update_pixmap(icon, icon->file_image); + icon_update_pixmap(icon, NULL); set_dockapp_in_icon(icon); } http://repo.or.cz/w/wmaker-crm.git/commit/522d84b0ef94a53e37f236bb4864b34d57eac0e5 commit 522d84b0ef94a53e37f236bb4864b34d57eac0e5 Author: Rodolfo GarcÃa Peñas (kix) <k...@kix.es> Date: Wed Nov 14 19:53:04 2012 +0100 wIconUpdate image preselected The function wIconUpdate can receive a image to setup as icon image. If image is NULL, then use the original method, using different procedures to get the image. diff --git a/src/appicon.c b/src/appicon.c index 7b59792..902559c 100644 --- a/src/appicon.c +++ b/src/appicon.c @@ -151,7 +151,7 @@ void makeAppIconFor(WApplication *wapp) /* Create the icon */ wapp->app_icon = wAppIconCreate(wapp->main_window_desc); - wIconUpdate(wapp->app_icon->icon); + wIconUpdate(wapp->app_icon->icon, NULL); /* Now, paint the icon */ if (!WFLAGP(wapp->main_window_desc, no_appicon)) @@ -256,7 +256,7 @@ void removeAppIconFor(WApplication *wapp) wapp->app_icon->icon->icon_win = None; /* Update the icon images */ - wIconUpdate(wapp->app_icon->icon); + wIconUpdate(wapp->app_icon->icon, NULL); /* Paint it */ wAppIconPaint(wapp->app_icon); @@ -991,7 +991,7 @@ void create_appicon_from_dock(WWindow *wwin, WApplication *wapp, Window main_win wapp->app_icon->icon->icon_win = mainw->wm_hints->icon_window; /* Update the icon images */ - wIconUpdate(wapp->app_icon->icon); + wIconUpdate(wapp->app_icon->icon, NULL); /* Paint it */ wAppIconPaint(wapp->app_icon); diff --git a/src/client.c b/src/client.c index 89f6277..975adb1 100644 --- a/src/client.c +++ b/src/client.c @@ -482,11 +482,11 @@ void wClientCheckProperty(WWindow * wwin, XPropertyEvent * event) WApplication *wapp; if (wwin->flags.miniaturized && wwin->icon) { - wIconUpdate(wwin->icon); + wIconUpdate(wwin->icon, NULL); } wapp = wApplicationOf(wwin->main_window); if (wapp && wapp->app_icon) { - wIconUpdate(wapp->app_icon->icon); + wIconUpdate(wapp->app_icon->icon, NULL); wAppIconPaint(wapp->app_icon); } } diff --git a/src/dock.c b/src/dock.c index d7d5c53..6e2e0e3 100644 --- a/src/dock.c +++ b/src/dock.c @@ -541,7 +541,7 @@ static void keepIconsCallback(WMenu *menu, WMenuEntry *entry) aicon->icon->shadowed = 0; /* Update the icon images */ - wIconUpdate(aicon->icon); + wIconUpdate(aicon->icon, NULL); /* Paint it */ wAppIconPaint(aicon); @@ -1938,7 +1938,7 @@ Bool wDockAttachIcon(WDock *dock, WAppIcon *icon, int x, int y, Bool update_icon /* Update the icon images */ if (lupdate_icon) - wIconUpdate(icon->icon); + wIconUpdate(icon->icon, NULL); /* Paint it */ wAppIconPaint(icon); @@ -2089,7 +2089,7 @@ static Bool moveIconBetweenDocks(WDock *src, WDock *dest, WAppIcon *icon, int x, /* Update the icon images */ if (update_icon) - wIconUpdate(icon->icon); + wIconUpdate(icon->icon, NULL); /* Paint it */ wAppIconPaint(icon); @@ -2166,7 +2166,7 @@ void wDockDetach(WDock *dock, WAppIcon *icon) /* Update the icon images */ if (update_icon) - wIconUpdate(icon->icon); + wIconUpdate(icon->icon, NULL); /* Paint it */ wAppIconPaint(icon); diff --git a/src/icon.c b/src/icon.c index 843cb73..e336793 100644 --- a/src/icon.c +++ b/src/icon.c @@ -94,7 +94,7 @@ static void tileObserver(void *self, WMNotification *notif) { WIcon *icon = (WIcon *) self; - wIconUpdate(icon); + wIconUpdate(icon, NULL); XClearArea(dpy, icon->core->window, 0, 0, 1, 1, True); } @@ -152,7 +152,7 @@ WIcon *icon_create_for_wwindow(WWindow *wwin) icon->tile_type = TILE_NORMAL; - wIconUpdate(icon); + wIconUpdate(icon, NULL); WMAddNotificationObserver(appearanceObserver, icon, WNIconAppearanceSettingsChanged, icon); WMAddNotificationObserver(tileObserver, icon, WNIconTileSettingsChanged, icon); @@ -177,7 +177,7 @@ WIcon *icon_create_for_dock(WScreen *scr, char *command, char *wm_instance, char icon->tile_type = tile; - wIconUpdate(icon); + wIconUpdate(icon, NULL); WMAddNotificationObserver(appearanceObserver, icon, WNIconAppearanceSettingsChanged, icon); WMAddNotificationObserver(tileObserver, icon, WNIconTileSettingsChanged, icon); @@ -346,7 +346,7 @@ void wIconChangeTitle(WIcon *icon, char *new_title) icon->icon_name = new_title; if (changed) - wIconUpdate(icon); + wIconUpdate(icon, NULL); else wIconPaint(icon); } @@ -400,7 +400,7 @@ Bool wIconChangeImageFile(WIcon *icon, char *file) /* Set the new image */ icon->file_image = image; icon->file = wstrdup(path); - wIconUpdate(icon); + wIconUpdate(icon, NULL); } else { error = 1; } @@ -597,26 +597,30 @@ static void unset_icon_image(WIcon *icon) } } -void wIconUpdate(WIcon *icon) +void wIconUpdate(WIcon *icon, RImage *image) { WWindow *wwin = icon->owner; - if (wwin && WFLAGP(wwin, always_user_icon)) { - /* Forced use user_icon */ - get_rimage_icon_from_user_icon(icon); - } else if (icon->icon_win != None) { - /* Get the Pixmap from the WIcon */ - get_rimage_icon_from_icon_win(icon); - } else if (wwin && wwin->net_icon_image) { - /* Use _NET_WM_ICON icon */ - get_rimage_icon_from_x11(icon); - } else if (wwin && wwin->wm_hints && (wwin->wm_hints->flags & IconPixmapHint)) { - /* Get the Pixmap from the wm_hints, else, from the user */ - if (get_rimage_icon_from_wm_hints(icon)) - get_rimage_icon_from_user_icon(icon); + if (image) { + icon->file_image = image; } else { - /* Get the Pixmap from the user */ - get_rimage_icon_from_user_icon(icon); + if (wwin && WFLAGP(wwin, always_user_icon)) { + /* Forced use user_icon */ + get_rimage_icon_from_user_icon(icon); + } else if (icon->icon_win != None) { + /* Get the Pixmap from the WIcon */ + get_rimage_icon_from_icon_win(icon); + } else if (wwin && wwin->net_icon_image) { + /* Use _NET_WM_ICON icon */ + get_rimage_icon_from_x11(icon); + } else if (wwin && wwin->wm_hints && (wwin->wm_hints->flags & IconPixmapHint)) { + /* Get the Pixmap from the wm_hints, else, from the user */ + if (get_rimage_icon_from_wm_hints(icon)) + get_rimage_icon_from_user_icon(icon); + } else { + /* Get the Pixmap from the user */ + get_rimage_icon_from_user_icon(icon); + } } update_icon_pixmap(icon); diff --git a/src/icon.h b/src/icon.h index 5c83733..74e6211 100644 --- a/src/icon.h +++ b/src/icon.h @@ -58,7 +58,7 @@ WIcon *icon_create_for_wwindow(WWindow *wwin); void wIconDestroy(WIcon *icon); void wIconPaint(WIcon *icon); -void wIconUpdate(WIcon *icon); +void wIconUpdate(WIcon *icon, RImage *image); void wIconSelect(WIcon *icon); void wIconChangeTitle(WIcon *icon, char *new_title); void update_icon_pixmap(WIcon *icon); diff --git a/src/wmspec.c b/src/wmspec.c index b3dfb8b..c758f0a 100644 --- a/src/wmspec.c +++ b/src/wmspec.c @@ -468,12 +468,12 @@ static void updateIconImage(WWindow *wwin) /* Refresh the Window Icon */ if (wwin->icon) - wIconUpdate(wwin->icon); + wIconUpdate(wwin->icon, NULL); /* Refresh the application icon */ WApplication *app = wApplicationOf(wwin->main_window); if (app && app->app_icon) { - wIconUpdate(app->app_icon->icon); + wIconUpdate(app->app_icon->icon, NULL); wAppIconPaint(app->app_icon); } } ----------------------------------------------------------------------- Summary of changes: src/appicon.c | 6 ++-- src/client.c | 4 +- src/dock.c | 8 +++--- src/icon.c | 68 ++++++++++++++++++++++++++++------------------------- src/icon.h | 3 +- src/winspector.c | 32 +++++++++++++++++-------- src/wmspec.c | 4 +- 7 files changed, 71 insertions(+), 54 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.