Re: FVWM: window buttons and button-focus

2010-03-30 Thread Thomas Adam
On 30 March 2010 14:12, JUNG, Christian christian.j...@saarstahl.com wrote:
 -Original Message-
 From: thomas.ada...@gmail.com
 [mailto:thomas.ada...@gmail.com] On Behalf Of Thomas Adam
 Sent: Monday, March 29, 2010 11:04 AM
 To: JUNG, Christian
 Cc: fvwm@fvwm.org
 Subject: Re: FVWM: window buttons and button-focus


 The pointer is grabbed at the time the function is invoked, and as
 such the action would apply regardless.  FVWM has no way of knowing
 where the mouse is to correctly invoke the function as you're wanting
 it.


 Thanks for the reply Thomas.

 I'm curious: If the mouse button is pressed the function is entered and
 waits until the mouse button is released? I'll read the code...

For the duration of the function, but it also depends on the action in
the function (c.f. use of H -- for hold, as well as PipeRead).

This is a deliberate thing -- you're free to change it, but I won't
want to help you with the fallout.  :P

-- Thomas Adam



[PATCH] CMD_WindowList: Free allocated memory in case of error

2010-03-30 Thread Christoph Fritz
Hi,

 this frees allocated memory in case of an error.


Signed-off-by: Christoph Fritz chf.fr...@googlemail.com
---
 ChangeLog |4 
 fvwm/windowlist.c |1 +
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 15b140b..f93b375 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-03-30  Christoph Fritz chf.fr...@googlemail.com
+   * fvwm/windowlist.c (CMD_WindowList):
+   Free allocated memory in case of error.
+
 2010-02-28  Thomas Adam tho...@xteddy.org
* fvwm/move_resize.c (__resize_step):
Don't explicitly send MotionNotify event during Resize (GeometryWindow)
diff --git a/fvwm/windowlist.c b/fvwm/windowlist.c
index 23bc889..8034563 100644
--- a/fvwm/windowlist.c
+++ b/fvwm/windowlist.c
@@ -604,6 +604,7 @@ void CMD_WindowList(F_CMD_ARGS)
iconifiedList = malloc(numWindows*sizeof(t));
if (iconifiedList == NULL)
{
+   free(windowList);
return;
}
}
-- 
1.5.6.5


Subject: [PATCH] CMD_WindowList: Free allocated memory in case of error


Signed-off-by: Christoph Fritz chf.fr...@googlemail.com
---
 ChangeLog |4 
 fvwm/windowlist.c |1 +
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 15b140b..f93b375 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-03-30  Christoph Fritz chf.fr...@googlemail.com
+	* fvwm/windowlist.c (CMD_WindowList):
+	Free allocated memory in case of error.
+
 2010-02-28  Thomas Adam tho...@xteddy.org
 	* fvwm/move_resize.c (__resize_step):
 	Don't explicitly send MotionNotify event during Resize (GeometryWindow)
diff --git a/fvwm/windowlist.c b/fvwm/windowlist.c
index 23bc889..8034563 100644
--- a/fvwm/windowlist.c
+++ b/fvwm/windowlist.c
@@ -604,6 +604,7 @@ void CMD_WindowList(F_CMD_ARGS)
 		iconifiedList = malloc(numWindows*sizeof(t));
 		if (iconifiedList == NULL)
 		{
+			free(windowList);
 			return;
 		}
 	}
-- 
1.5.6.5



Re: [PATCH] CMD_WindowList: Free allocated memory in case of error

2010-03-30 Thread Thomas Adam
On 30 March 2010 15:35, Christoph Fritz chf.fr...@googlemail.com wrote:
 Hi,

  this frees allocated memory in case of an error.

Thanks.  Will tweak slightly and queue for later on.

-- Thomas Adam