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 3c2fc82b6ee9c451a87e2d3ade2983f9dd1e3999 (commit)
via 7889c50c3687f359d94a2a7517e9cdd679090554 (commit)
via 587a37dc60f48b64d96f88364cc3aa79740573a3 (commit)
via 70909f4d5d7d6d97706b375500e054ed4c2a0473 (commit)
from ae91ee4b0a6238b12d60bfdc8ada38ba326bd1e3 (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/3c2fc82b6ee9c451a87e2d3ade2983f9dd1e3999
commit 3c2fc82b6ee9c451a87e2d3ade2983f9dd1e3999
Author: Christophe CURIS <[email protected]>
Date: Sun Jun 9 16:28:48 2013 +0200
WUtil: Avoid memory leak and misbehaviour on internal function
'getuserhomedir'
If the function was called more than once with different usernames
it would always return the path for the user on the first call,
which is not what would be expected.
Furthermore, if the function succeeds it allocated memory to save
this path but it was never freed.
The good thing is that the use case for this function is so rare
that it is improbable it was ever called, which explains why it
was never seen.
The new code always behaves as expected, and does not allocate
memory anymore to avoid wasting time and memory for such small
things, which is acceptable because this function is local.
Signed-off-by: Christophe CURIS <[email protected]>
diff --git a/WINGs/findfile.c b/WINGs/findfile.c
index f18aa3a..42845d0 100644
--- a/WINGs/findfile.c
+++ b/WINGs/findfile.c
@@ -67,25 +67,31 @@ char *wgethomedir()
return home;
}
-static char *getuserhomedir(const char *username)
+/*
+ * Return the home directory for the specified used
+ *
+ * If user not found, returns NULL, otherwise always returns a path that is
+ * statically stored.
+ *
+ * Please note you must use the path before any other call to 'getpw*' or it
+ * may be erased. This is a design choice to avoid duplication considering
+ * the use case for this function.
+ */
+static const char *getuserhomedir(const char *username)
{
- static char *home = NULL;
+ static const char default_home[] = "/";
struct passwd *user;
- if (home)
- return home;
-
user = getpwnam(username);
if (!user) {
werror(_("could not get password entry for user %s"), username);
return NULL;
}
if (!user->pw_dir)
- home = "/";
+ return default_home;
else
- home = wstrdup(user->pw_dir);
+ return user->pw_dir;
- return home;
}
char *wexpandpath(const char *path)
@@ -98,7 +104,7 @@ char *wexpandpath(const char *path)
memset(buffer, 0, PATH_MAX + 2);
if (*path == '~') {
- char *home;
+ const char *home;
path++;
if (*path == '/' || *path == 0) {
http://repo.or.cz/w/wmaker-crm.git/commit/7889c50c3687f359d94a2a7517e9cdd679090554
commit 7889c50c3687f359d94a2a7517e9cdd679090554
Author: Christophe CURIS <[email protected]>
Date: Sun Jun 9 13:49:23 2013 +0200
Configure: Use automake's conditional to handle icon installation
The previous method was to use a custom install procedure, which
is a bit complex when automake can handle this for us, and as a
side effect it made 'distcheck' fail on uninstall procedure check.
The new method is to use a simple conditional and autoconf/automake
will do all the work for us.
Signed-off-by: Christophe CURIS <[email protected]>
diff --git a/WPrefs.app/tiff/Makefile.am b/WPrefs.app/tiff/Makefile.am
index 6927544..50c75ff 100644
--- a/WPrefs.app/tiff/Makefile.am
+++ b/WPrefs.app/tiff/Makefile.am
@@ -1,6 +1,7 @@
tiffdatadir = $(wprefs_datadir)/tiff
-EXTRA_DIST = +if ICON_EXT_TIFF
+dist_tiffdata_DATA = advancetonewworkspace.tiff animations.tiff
appearance.tiff @@ -72,13 +73,4 @@ EXTRA_DIST = workspace.tiff
workspacename.tiff xis.tiff
-
-TIFF_FILES=
-
-tiffdata_DATA=$(TIFF_FILES)
-
-install-data-local:
- if [ @ICONEXT@ = "tiff" -a x"$(TIFF_FILES)" = "x" ] ; then-
$(MAKE) install-data TIFF_FILES="$(EXTRA_DIST)";- fi
-
+endif
diff --git a/WPrefs.app/xpm/Makefile.am b/WPrefs.app/xpm/Makefile.am
index 20b8f9e..c491a7f 100644
--- a/WPrefs.app/xpm/Makefile.am
+++ b/WPrefs.app/xpm/Makefile.am
@@ -1,7 +1,7 @@
xpmdatadir = $(wprefs_datadir)/xpm
-
-EXTRA_DIST = +if ICON_EXT_XPM
+dist_xpmdata_DATA = advancetonewworkspace.xpm animations.xpm
appearance.xpm @@ -72,14 +72,4 @@ EXTRA_DIST = workspace.xpm
workspacename.xpm xis.xpm
-
-
-XPM_FILES=
-
-xpmdata_DATA=$(XPM_FILES)
-
-install-data-local:
- if [ @ICONEXT@ = "xpm" -a x"$(XPM_FILES)" = "x" ] ; then-
$(MAKE) install-data XPM_FILES="$(EXTRA_DIST)";- fi
-
+endif
diff --git a/configure.ac b/configure.ac
index 32ea0d6..3feeaae 100644
--- a/configure.ac
+++ b/configure.ac
@@ -792,6 +792,8 @@ AC_SUBST(HEADER_SEARCH_PATH)
AC_SUBST(GFXLIBS)
AC_SUBST(ICONEXT)
+AM_CONDITIONAL([ICON_EXT_XPM], [test "x$ICONEXT" = "xxpm"])
+AM_CONDITIONAL([ICON_EXT_TIFF], [test "x$ICONEXT" = "xtiff"])
dnl ==============================================
http://repo.or.cz/w/wmaker-crm.git/commit/587a37dc60f48b64d96f88364cc3aa79740573a3
commit 587a37dc60f48b64d96f88364cc3aa79740573a3
Author: Iain Patterson <[email protected]>
Date: Sun Jun 9 13:18:18 2013 +0100
Maximization regression
wMaximizeWindow() was previously rewritten and simplified.
Unfortunately the rewrite introduced a regression with windows which
were horizontally maximized or Maximusized, whereby they would be too
small after the maximization.
The bug is easy to see by opening a standard 80x24 terminal and hitting
the maximize horizontally shortcut. The terminal shrinks to 21 lines.
Pressing the shortcut key again correctly restores it to 80x24.
The fix is to refrain from shrinking the final window height, which is
done to account for its frame border and titlebar, for the affected
maximization styles.
diff --git a/src/actions.c b/src/actions.c
index 1417833..e492419 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -410,8 +410,6 @@ void wMaximizeWindow(WWindow *wwin, int directions)
new_height += wwin->frame->bottom_width - 1;
new_y -= wwin->frame->top_width;
}
- /* HACK: this will be subtracted again below */
- new_height += wwin->frame->top_width +
wwin->frame->bottom_width;
wwin->maximus_x = new_x;
wwin->maximus_y = new_y;
@@ -457,7 +455,7 @@ void wMaximizeWindow(WWindow *wwin, int directions)
}
}
- if (!WFLAGP(wwin, full_maximize))
+ if (!WFLAGP(wwin, full_maximize) && !(directions == MAX_MAXIMUS ||
directions == MAX_HORIZONTAL))
new_height -= wwin->frame->top_width +
wwin->frame->bottom_width;
/* set maximization state */
http://repo.or.cz/w/wmaker-crm.git/commit/70909f4d5d7d6d97706b375500e054ed4c2a0473
commit 70909f4d5d7d6d97706b375500e054ed4c2a0473
Author: Iain Patterson <[email protected]>
Date: Sun Jun 2 15:38:20 2013 +0100
funcs.h regression
funcs.h was previously removed. Unfortunately usermenu.c still
attempted to #include it.
diff --git a/src/usermenu.c b/src/usermenu.c
index 22d089f..283a823 100644
--- a/src/usermenu.c
+++ b/src/usermenu.c
@@ -72,7 +72,6 @@
#include "WindowMaker.h"
#include "menu.h"
#include "actions.h"
-#include "funcs.h"
#include "keybind.h"
#include "xmodifier.h"
-----------------------------------------------------------------------
Summary of changes:
WINGs/findfile.c | 24 +++++++++++++++---------
WPrefs.app/tiff/Makefile.am | 14 +++-----------
WPrefs.app/xpm/Makefile.am | 16 +++-------------
configure.ac | 2 ++
src/actions.c | 4 +---
src/usermenu.c | 1 -
6 files changed, 24 insertions(+), 37 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].