On Wed, 7 Mar 2012 at 1:15:11 +0100, Rodolfo García Peñas wrote:
>
> From dc9a8d24f3b78c20511f47ad86e2eb85ee62234d Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?"Rodolfo=20Garc=C3=ADa=20Pe=C3=B1as=20(kix)"?= <[email protected]>
> Date: Sun, 4 Mar 2012 12:45:34 +0100
> Subject: [PATCH 2/8] WindowMaker: New get_wwindow_image_from_x11 function
>
> A new function is created to get the image from the X11 window.
>
> The function updateIconImage is splitted in two blocks, one is moved to
> get_wwindow_image_from_x11 with the X11 code, and other is used to update the
> Application and Window icons (kept in the same function).
> ---
> src/wmspec.c | 35 +++++++++++++++++++++--------------
> 1 files changed, 21 insertions(+), 14 deletions(-)
>
> diff --git a/src/wmspec.c b/src/wmspec.c
> index 5bdc43c..bbd96bd 100644
> --- a/src/wmspec.c
> +++ b/src/wmspec.c
> @@ -386,7 +386,7 @@ static unsigned long *findBestIcon(unsigned long *data,
> unsigned long items)
> return icon;
> }
>
> -static RImage *makeRImageFromARGBData(unsigned long *data)
> +RImage *makeRImageFromARGBData(unsigned long *data)
Why are you doing this? You should not turn a static function into
non-static for no good reason.
> {
> int size, width, height, i;
> RImage *image;
> @@ -413,40 +413,47 @@ static RImage *makeRImageFromARGBData(unsigned long
> *data)
> return image;
> }
>
> -static void updateIconImage(WWindow * wwin)
> +RImage *get_wwindow_image_from_x11(WWindow *wwin)
And this new function should be static, as it's used only in this file.
>
> XFree(property);
> + return(image);
return is not a function, so no parenthesis there.
--
To unsubscribe, send mail to [email protected].