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 0106b2a4e90c5618760304261e241699eabd5a20 (commit)
via 0493974cbcba8b9f648d1c66c7332ca5b29529ed (commit)
via d5e5ae6ca0099de103c1ca9440a6cc49769fda93 (commit)
via df4141236b52bbc4d3767f5b493980153886d02c (commit)
via 5728b6436ddef73e2995548b4b2ec061f7567a15 (commit)
via 3d0223ded4979c3d347baa0999573f8651766b0d (commit)
via 156d8ebfa52a66f2634a3668dcad1b97e9392f02 (commit)
via 280e1e099d1e5998e76251b0d4bfb6fa657968de (commit)
from c3024542ad3f7c4adf420b437852c50f334a552c (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/0106b2a4e90c5618760304261e241699eabd5a20
commit 0106b2a4e90c5618760304261e241699eabd5a20
Author: Rodolfo GarcÃa Peñas (kix) <[email protected]>
Date: Wed Oct 31 22:44:24 2012 +0100
get_pixmap_icon_from_wm_hints rewritten
The function get_pixmap_icon_from_wm_hints() is now rewritten using
the functions get_wwindow_image_from_wmhints() and icon_update_pixmap().
Now, the function creates a new RImage using
get_wwindow_image_from_wmhints()
and then updates the Pixmap using the function icon_update_pixmap().
diff --git a/src/icon.c b/src/icon.c
index 2f1f07c..018333b 100644
--- a/src/icon.c
+++ b/src/icon.c
@@ -728,60 +728,22 @@ static void get_pixmap_icon_from_icon_win(WIcon * icon)
/* Get the Pixmap from the XWindow wm_hints */
static int get_pixmap_icon_from_wm_hints(WIcon *icon)
{
- Pixmap pixmap;
+ RImage *image = NULL;
unsigned int w, h, d;
- int x, y;
WWindow *wwin = icon->owner;
- WScreen *scr = icon->core->screen_ptr;
- int title_height = WMFontHeight(scr->icon_title_font);
if (!getSize(wwin->wm_hints->icon_pixmap, &w, &h, &d)) {
icon->owner->wm_hints->flags &= ~IconPixmapHint;
return 1;
}
- pixmap = XCreatePixmap(dpy, icon->core->window, wPreferences.icon_size,
- wPreferences.icon_size, scr->w_depth);
- XSetClipMask(dpy, scr->copy_gc, None);
- XCopyArea(dpy, scr->icon_tile_pixmap, pixmap, scr->copy_gc, 0, 0,
- wPreferences.icon_size, wPreferences.icon_size, 0, 0);
-
- if (w > wPreferences.icon_size)
- w = wPreferences.icon_size;
- x = (wPreferences.icon_size - w) / 2;
-
- if (icon->show_title && (title_height < wPreferences.icon_size)) {
- drawIconTitle(scr, pixmap, title_height);
-
- if (h > wPreferences.icon_size - title_height - 2) {
- h = wPreferences.icon_size - title_height - 2;
- y = title_height + 1;
- } else {
- y = (wPreferences.icon_size - h - title_height) / 2 +
title_height + 1;
- }
- } else {
- if (w > wPreferences.icon_size)
- w = wPreferences.icon_size;
- y = (wPreferences.icon_size - h) / 2;
- }
-
- if (wwin->wm_hints->flags & IconMaskHint)
- XSetClipMask(dpy, scr->copy_gc, wwin->wm_hints->icon_mask);
-
- XSetClipOrigin(dpy, scr->copy_gc, x, y);
-
- if (d != scr->w_depth) {
- XSetForeground(dpy, scr->copy_gc, scr->black_pixel);
- XSetBackground(dpy, scr->copy_gc, scr->white_pixel);
- XCopyPlane(dpy, wwin->wm_hints->icon_pixmap, pixmap,
scr->copy_gc, 0, 0, w, h, x, y, 1);
- } else {
- XCopyArea(dpy, wwin->wm_hints->icon_pixmap, pixmap,
scr->copy_gc, 0, 0, w, h, x, y);
- }
+ image = get_wwindow_image_from_wmhints(wwin, icon);
+ if (!image)
+ return 1;
- XSetClipOrigin(dpy, scr->copy_gc, 0, 0);
+ icon_update_pixmap(icon, image);
- icon->pixmap = pixmap;
- return (0);
+ return 0;
}
void wIconPaint(WIcon * icon)
http://repo.or.cz/w/wmaker-crm.git/commit/0493974cbcba8b9f648d1c66c7332ca5b29529ed
commit 0493974cbcba8b9f648d1c66c7332ca5b29529ed
Author: Rodolfo GarcÃa Peñas (kix) <[email protected]>
Date: Wed Oct 31 22:44:23 2012 +0100
get_pixmap_icon_from_wm_hints uses getSize
The function get_pixmap_icon_from_wm_hints() now uses getSize() and
the code dup is removed.
diff --git a/src/icon.c b/src/icon.c
index db726e4..2f1f07c 100644
--- a/src/icon.c
+++ b/src/icon.c
@@ -728,15 +728,14 @@ static void get_pixmap_icon_from_icon_win(WIcon * icon)
/* Get the Pixmap from the XWindow wm_hints */
static int get_pixmap_icon_from_wm_hints(WIcon *icon)
{
- Window jw;
Pixmap pixmap;
- unsigned int w, h, ju, d;
- int ji, x, y;
+ unsigned int w, h, d;
+ int x, y;
WWindow *wwin = icon->owner;
WScreen *scr = icon->core->screen_ptr;
int title_height = WMFontHeight(scr->icon_title_font);
- if (!XGetGeometry(dpy, wwin->wm_hints->icon_pixmap, &jw, &ji, &ji, &w,
&h, &ju, &d)) {
+ if (!getSize(wwin->wm_hints->icon_pixmap, &w, &h, &d)) {
icon->owner->wm_hints->flags &= ~IconPixmapHint;
return 1;
}
http://repo.or.cz/w/wmaker-crm.git/commit/d5e5ae6ca0099de103c1ca9440a6cc49769fda93
commit d5e5ae6ca0099de103c1ca9440a6cc49769fda93
Author: Rodolfo GarcÃa Peñas (kix) <[email protected]>
Date: Wed Oct 31 22:44:22 2012 +0100
getSize returns XGetGeometry exit
The function getSize now returns the returned value by XGetGeometry.
The function now is not INLINE.
diff --git a/src/icon.c b/src/icon.c
index f693e77..db726e4 100644
--- a/src/icon.c
+++ b/src/icon.c
@@ -97,13 +97,13 @@ static void tileObserver(void *self, WMNotification * notif)
/************************************/
-INLINE static void getSize(Drawable d, unsigned int *w, unsigned int *h,
unsigned int *dep)
+static int getSize(Drawable d, unsigned int *w, unsigned int *h, unsigned int
*dep)
{
Window rjunk;
int xjunk, yjunk;
unsigned int bjunk;
- XGetGeometry(dpy, d, &rjunk, &xjunk, &yjunk, w, h, &bjunk, dep);
+ return XGetGeometry(dpy, d, &rjunk, &xjunk, &yjunk, w, h, &bjunk, dep);
}
WIcon *icon_create_for_wwindow(WWindow *wwin)
http://repo.or.cz/w/wmaker-crm.git/commit/df4141236b52bbc4d3767f5b493980153886d02c
commit df4141236b52bbc4d3767f5b493980153886d02c
Author: Rodolfo GarcÃa Peñas (kix) <[email protected]>
Date: Wed Oct 31 22:44:21 2012 +0100
CachedPixmaps added as pixmap folder
The CachedPixmap folder is added to the icon list. This is because
if one icon is created, but the user change it and set other icon, the first
icon cannot be selected anymore using the settings window. The user
needs modify the configuration files by hand.
Some extra paths are added to the debian default config file.
diff --git a/WindowMaker/Defaults/WindowMaker.in
b/WindowMaker/Defaults/WindowMaker.in
index 6b2890d..3e576be 100644
--- a/WindowMaker/Defaults/WindowMaker.in
+++ b/WindowMaker/Defaults/WindowMaker.in
@@ -14,6 +14,7 @@
"#pkgdatadir#/Pixmaps",
"/usr/include/X11/pixmaps",
"~/GNUstep/Library/WindowMaker/Pixmaps",
+ "~/GNUstep/Library/WindowMaker/CachedPixmaps",
"/usr/share/icons",
"/usr/local/share/pixmaps",
"/usr/share/pixmaps"
@@ -21,6 +22,7 @@
PixmapPath = (
"~/GNUstep/Library/WindowMaker/Pixmaps",
"~/GNUstep/Library/WindowMaker/Backgrounds",
+ "~/GNUstep/Library/WindowMaker/CachedPixmaps",
"#pkgdatadir#/Pixmaps",
"#pkgdatadir#/Backgrounds",
"/usr/include/X11/pixmaps",
diff --git a/debian/debianfiles/conf/WindowMaker
b/debian/debianfiles/conf/WindowMaker
index 3d0bb75..cc36e7c 100644
--- a/debian/debianfiles/conf/WindowMaker
+++ b/debian/debianfiles/conf/WindowMaker
@@ -11,20 +11,25 @@
IconificationStyle = Zoom;
IconPath = (
"~/GNUstep/Library/Icons",
- "/usr/local/share/WindowMaker/Icons",
+ "~/GNUstep/Library/WindowMaker/Pixmaps",
+ "~/GNUstep/Library/WindowMaker/CachedPixmaps",
"/usr/share/WindowMaker/Icons",
- "/usr/local/share/icons",
- "/usr/share/icons"
+ "/usr/share/WindowMaker/Pixmaps",
+ "/usr/share/icons",
+ "/usr/local/share/WindowMaker/Icons",
+ "/usr/local/share/WindowMaker/Pixmaps",
+ "/usr/local/share/icons"
);
PixmapPath = (
"~/GNUstep/Library/WindowMaker/Pixmaps",
"~/GNUstep/Library/WindowMaker/Backgrounds",
- "/usr/local/share/WindowMaker/Pixmaps",
- "/usr/local/share/WindowMaker/Backgrounds",
+ "~/GNUstep/Library/WindowMaker/CachedPixmaps",
"/usr/share/WindowMaker/Backgrounds",
"/usr/share/WindowMaker/Pixmaps",
- "/usr/local/share/pixmaps",
- "/usr/share/pixmaps"
+ "/usr/share/pixmaps",
+ "/usr/local/share/WindowMaker/Pixmaps",
+ "/usr/local/share/WindowMaker/Backgrounds",
+ "/usr/local/share/pixmaps"
);
WindowTitleBalloons = YES;
IconSize = 64;
http://repo.or.cz/w/wmaker-crm.git/commit/5728b6436ddef73e2995548b4b2ec061f7567a15
commit 5728b6436ddef73e2995548b4b2ec061f7567a15
Author: Rodolfo GarcÃa Peñas (kix) <[email protected]>
Date: Wed Oct 31 22:44:19 2012 +0100
wIconChangeImageFile change image only if found
This patch changes the behavior of wIconChangeImageFile.
Before apply this patch the behavior was:
The image (file_image) is set to NULL, then the function tried to find
a new image. If the new image was not found, the variable file_image
contains
NULL when the function returns, and the return code was 1.
With this patch the image is changed only if a new image is found.
diff --git a/src/icon.c b/src/icon.c
index 0b95df2..f693e77 100644
--- a/src/icon.c
+++ b/src/icon.c
@@ -373,31 +373,39 @@ Bool wIconChangeImageFile(WIcon *icon, char *file)
{
WScreen *scr = icon->core->screen_ptr;
char *path;
+ RImage *image = NULL;
int error = 0;
+ /* If no new image, don't do nothing */
if (!file)
return True;
- if (icon->file_image) {
- RReleaseImage(icon->file_image);
- icon->file_image = NULL;
- }
-
+ /* Find the new image */
path = FindImage(wPreferences.icon_path, file);
- if (path) {
- icon->file_image = get_rimage_from_file(scr, path,
wPreferences.icon_size);
+ if (path)
+ image = get_rimage_from_file(scr, path, wPreferences.icon_size);
+ else
+ error = 1;
+
+ /* New image! */
+ if (!error && image) {
+ /* Remove the old one */
if (icon->file_image) {
- icon->file = wstrdup(path);
- wIconUpdate(icon);
- } else {
- error = 1;
+ RReleaseImage(icon->file_image);
+ icon->file_image = NULL;
}
- wfree(path);
+ /* Set the new image */
+ icon->file_image = image;
+ icon->file = wstrdup(path);
+ wIconUpdate(icon);
} else {
error = 1;
}
+ if (path)
+ wfree(path);
+
return !error;
}
http://repo.or.cz/w/wmaker-crm.git/commit/3d0223ded4979c3d347baa0999573f8651766b0d
commit 3d0223ded4979c3d347baa0999573f8651766b0d
Author: Rodolfo GarcÃa Peñas (kix) <[email protected]>
Date: Wed Oct 31 22:44:18 2012 +0100
wIconChangeImageFile removed dup code
This patch removes the dup code with get_rimage_from_file.
diff --git a/src/icon.c b/src/icon.c
index 94d9567..0b95df2 100644
--- a/src/icon.c
+++ b/src/icon.c
@@ -369,10 +369,9 @@ RImage *wIconValidateIconSize(RImage *icon, int max_size)
return icon;
}
-Bool wIconChangeImageFile(WIcon * icon, char *file)
+Bool wIconChangeImageFile(WIcon *icon, char *file)
{
WScreen *scr = icon->core->screen_ptr;
- RImage *image;
char *path;
int error = 0;
@@ -385,17 +384,20 @@ Bool wIconChangeImageFile(WIcon * icon, char *file)
}
path = FindImage(wPreferences.icon_path, file);
+ if (path) {
+ icon->file_image = get_rimage_from_file(scr, path,
wPreferences.icon_size);
+ if (icon->file_image) {
+ icon->file = wstrdup(path);
+ wIconUpdate(icon);
+ } else {
+ error = 1;
+ }
- if (path && (image = RLoadImage(scr->rcontext, path, 0))) {
- icon->file_image = wIconValidateIconSize(image,
wPreferences.icon_size);
- wIconUpdate(icon);
+ wfree(path);
} else {
error = 1;
}
- if (path)
- wfree(path);
-
return !error;
}
http://repo.or.cz/w/wmaker-crm.git/commit/156d8ebfa52a66f2634a3668dcad1b97e9392f02
commit 156d8ebfa52a66f2634a3668dcad1b97e9392f02
Author: Rodolfo GarcÃa Peñas (kix) <[email protected]>
Date: Wed Oct 31 22:44:17 2012 +0100
wIconChangeImageFile don't update without file
The function wIconChangeImageFile mustn't update the icon if
no file is set.
This is a bug. To reproduce it:
1. Right click on dock icon. Select "Settings"
2. Erase the Icon Image contents (set empty)
3. Click "OK" -> Exit, no changes... no?
4. Right click on the same dock icon. Select "Settings"
5. Erase the Icon Image contents (set empty)
6. Click "OK" -> Crash
If wmaker don't crash, watch the file ~/GNUstep/Defaults/WMWindowAttributes,
the default icon ("*" has trash in the name). Probably something is not fine
at wIconUpdate.
diff --git a/src/icon.c b/src/icon.c
index da93679..94d9567 100644
--- a/src/icon.c
+++ b/src/icon.c
@@ -376,16 +376,14 @@ Bool wIconChangeImageFile(WIcon * icon, char *file)
char *path;
int error = 0;
+ if (!file)
+ return True;
+
if (icon->file_image) {
RReleaseImage(icon->file_image);
icon->file_image = NULL;
}
- if (!file) {
- wIconUpdate(icon);
- return True;
- }
-
path = FindImage(wPreferences.icon_path, file);
if (path && (image = RLoadImage(scr->rcontext, path, 0))) {
http://repo.or.cz/w/wmaker-crm.git/commit/280e1e099d1e5998e76251b0d4bfb6fa657968de
commit 280e1e099d1e5998e76251b0d4bfb6fa657968de
Author: Rodolfo GarcÃa Peñas (kix) <[email protected]>
Date: Wed Oct 31 22:44:16 2012 +0100
Removed dup code at get_default_image
This patch removes the code dup at get_default_image. Now,
this function calls get_rimage_from_file()
diff --git a/src/icon.c b/src/icon.c
index b4ccfc5..da93679 100644
--- a/src/icon.c
+++ b/src/icon.c
@@ -649,19 +649,13 @@ static RImage *get_default_image(WScreen *scr)
file = wDefaultGetIconFile(NULL, NULL, True);
if (file) {
path = FindImage(wPreferences.icon_path, file);
- if (path) {
- image = RLoadImage(scr->rcontext, path, 0);
- if (!image)
- wwarning(_("could not load default icon
"%s":%s"),
- file, RMessageForError(RErrorCode));
- wfree(path);
- } else {
+ image = get_rimage_from_file(scr, path, wPreferences.icon_size);
+
+ if (!image)
wwarning(_("could not find default icon "%s""), file);
- }
- }
- /* Validate the icon size */
- image = wIconValidateIconSize(image, wPreferences.icon_size);
+ wfree(file);
+ }
return image;
}
-----------------------------------------------------------------------
Summary of changes:
WindowMaker/Defaults/WindowMaker.in | 2 +
debian/debianfiles/conf/WindowMaker | 19 ++++--
src/icon.c | 107 +++++++++++-----------------------
3 files changed, 49 insertions(+), 79 deletions(-)
repo.or.cz automatic notification. Contact project admin [email protected]
if you want to unsubscribe, or site admin [email protected] if you receive
no reply.
--
wmaker-crm.git ("The Window Maker window manager")
--
To unsubscribe, send mail to [email protected].