[repo.or.cz] wmaker-crm.git branch next updated: wmaker-0.95.5-516-gadebdf41

2014-08-22 Thread crmafra
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  adebdf41c6ff33648fd884599e35b20a448500cc (commit)
  from  ef659ca1fb6f8c442a9b51754b695d8d5fdb423f (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/adebdf41c6ff33648fd884599e35b20a448500cc

commit adebdf41c6ff33648fd884599e35b20a448500cc
Author: David Maciejak 
Date:   Fri Aug 22 19:29:19 2014 +0800

wmaker: src/action.c merge duplicate code

This patch is merging some duplicate code related
to animation position.

diff --git a/src/actions.c b/src/actions.c
index ae326a11..aa88633f 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -1060,6 +1060,34 @@ static WWindow *recursiveTransientFor(WWindow * wwin)
return wwin;
 }
 
+static int getAnimationGeometry(WWindow *wwin, int *ix, int *iy, int *iw, int 
*ih)
+{
+   if (!wwin->screen_ptr->flags.startup && !wPreferences.no_animations
+   && !wwin->flags.skip_next_animation && wwin->icon != NULL) {
+   if (!wPreferences.disable_miniwindows
+   && !wwin->flags.net_handle_icon) {
+   *ix = wwin->icon_x;
+   *iy = wwin->icon_y;
+   *iw = wwin->icon->core->width;
+   *ih = wwin->icon->core->height;
+   } else {
+   if (wwin->flags.net_handle_icon) {
+   *ix = wwin->icon_x;
+   *iy = wwin->icon_y;
+   *iw = wwin->icon_w;
+   *ih = wwin->icon_h;
+   } else {
+   *ix = 0;
+   *iy = 0;
+   *iw = wwin->screen_ptr->scr_width;
+   *ih = wwin->screen_ptr->scr_height;
+   }
+   }
+   return 1;
+   }
+   return 0;
+}
+
 void wIconifyWindow(WWindow * wwin)
 {
XWindowAttributes attribs;
@@ -1137,6 +1165,9 @@ void wIconifyWindow(WWindow * wwin)
unmapTransientsFor(wwin);
 
if (present) {
+#ifdef ANIMATIONS
+   int ix, iy, iw, ih;
+#endif
XUngrabPointer(dpy, CurrentTime);
wWindowUnmap(wwin);
/* let all Expose events arrive so that we can repaint
@@ -1150,28 +1181,7 @@ void wIconifyWindow(WWindow * wwin)
 
flushExpose();
 #ifdef ANIMATIONS
-   if (!wwin->screen_ptr->flags.startup && 
!wwin->flags.skip_next_animation
-   && !wPreferences.no_animations) {
-   int ix, iy, iw, ih;
-
-   if (!wPreferences.disable_miniwindows && 
!wwin->flags.net_handle_icon) {
-   ix = wwin->icon_x;
-   iy = wwin->icon_y;
-   iw = wwin->icon->core->width;
-   ih = wwin->icon->core->height;
-   } else {
-   if (wwin->flags.net_handle_icon) {
-   ix = wwin->icon_x;
-   iy = wwin->icon_y;
-   iw = wwin->icon_w;
-   ih = wwin->icon_h;
-   } else {
-   ix = 0;
-   iy = 0;
-   iw = wwin->screen_ptr->scr_width;
-   ih = wwin->screen_ptr->scr_height;
-   }
-   }
+   if (getAnimationGeometry(wwin, &ix, &iy, &iw, &ih)) {
animateResize(wwin->screen_ptr, wwin->frame_x, 
wwin->frame_y,
  wwin->frame->core->width, 
wwin->frame->core->height, ix, iy, iw, ih);
}
@@ -1291,34 +1301,13 @@ void wDeiconifyWindow(WWindow *wwin)
/* if the window is in another workspace, do it silently */
if (!netwm_hidden) {
 #ifdef ANIMATIONS
-   if (!wwin->screen_ptr->flags.startup && 
!wPreferences.no_animations
-   && !wwin->flags.skip_next_animation && wwin->icon != NULL) {
-   int ix, iy, iw, ih;
-
-   if (!wPreferences.disable_miniwindows
-   && !wwin->flags.net_handle_icon) {
-   ix = wwin->icon_x;
-   iy = wwin->icon_y;
-   iw = wwin->icon->core->width;
-  

Re: [PATCH] wmaker: src/action.c merge duplicate code

2014-08-22 Thread Rodolfo García Peñas (kix)


"Rodolfo García Peñas (kix)"  escribió:


David Maciejak  escribió:


No problem i understand, enclosed the new patch.


Hi David,

is possible remove the extra curly brackets (in both "if"s)?:


Hi again,

Perhaps we can change this "if" from the negative way to possitive way:

+   if (!wwin->screen_ptr->flags.startup && !wPreferences.no_animations
+   && !wwin->flags.skip_next_animation && wwin->icon != NULL) {

to

+   if (wwin->screen_ptr->flags.startup || wPreferences.no_animations ||
+   wwin->flags.skip_next_animation || wwin->icon == NULL) {

Then we can return earlier:

+   if (wwin->screen_ptr->flags.startup || wPreferences.no_animations ||
+   wwin->flags.skip_next_animation || wwin->icon == NULL)
+   return 0;

And then add the rest of the code with less tabs:

+   if (!wPreferences.disable_miniwindows
+   && !wwin->flags.net_handle_icon) {
+   *ix = wwin->icon_x;
+   *iy = wwin->icon_y;
+   *iw = wwin->icon->core->width;
+   *ih = wwin->icon->core->height;
+   } else {
+   if (wwin->flags.net_handle_icon) {
+   *ix = wwin->icon_x;
+   *iy = wwin->icon_y;
+   *iw = wwin->icon_w;
+   *ih = wwin->icon_h;
+   } else {
+   *ix = 0;
+   *iy = 0;
+   *iw = wwin->screen_ptr->scr_width;
+   *ih = wwin->screen_ptr->scr_height;
+   }
+   }
+   return 1;
+}

What do you think? Perhaps could be an idea to add in a different
patch, following the Carlos recommendation about git bisect,...

Cheers,
kix.
Rodolfo García Peñas (kix)
http://www.kix.es/


--
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.


Re: [PATCH] wmaker: src/action.c merge duplicate code

2014-08-22 Thread Rodolfo García Peñas (kix)


David Maciejak  escribió:


No problem i understand, enclosed the new patch.


Hi David,

is possible remove the extra curly brackets (in both "if"s)?:

+   if (getAnimationGeometry(wwin, &ix, &iy, &iw, &ih)) *{*
animateResize(wwin->screen_ptr, ix, iy, iw, ih,
  wwin->frame_x, wwin->frame_y,
  wwin->frame->core->width,
wwin->frame->core->height);
*}*


Thanks a lot for your patches.
Best regards,
Rodolfo.
Rodolfo García Peñas (kix)
http://www.kix.es/


--
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.


[PATCH 2/2] dockapps/index.php: Remove redundant sort; let the perl script take care of it.

2014-08-22 Thread Doug Torrance
---
 dockapps/index.php | 1 -
 1 file changed, 1 deletion(-)

diff --git a/dockapps/index.php b/dockapps/index.php
index c97fbf2..5d9cadd 100644
--- a/dockapps/index.php
+++ b/dockapps/index.php
@@ -62,7 +62,6 @@ if ($name) {
array_push($versions,
   substr($key, strrpos($key, "-")+1));
}
-   rsort($versions);
foreach ($versions as $version) {
echo "" .
"$name-$version\n";
-- 
1.9.1


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.


[PATCH 1/2] dockapps/dockapps.db: Update for wmacpi and wmacpi-ng.

2014-08-22 Thread Doug Torrance
---
 dockapps/dockapps.db | 32 ++--
 1 file changed, 30 insertions(+), 2 deletions(-)

diff --git a/dockapps/dockapps.db b/dockapps/dockapps.db
index 8a50ec3..18e11ed 100644
--- a/dockapps/dockapps.db
+++ b/dockapps/dockapps.db
@@ -40,14 +40,42 @@ dockapps = 299
 category = System Monitoring
 
 [wmacpi]
-version-1.34+20120605 = f97409b25908700bd8547f84c82d33a12832c101
+version-2.2 = efbb69d77277b35cb7689dc6850f1dc5b40b8be6
+version-2.2rc5 = daa0ba41e07a073d40576e4344d3ddfb555d6282
+version-2.2rc4 = 2d177139b0215d984ee579967f3ffdf1cbec0dc2
+version-2.2rc3 = c8826c566b626e5fe2a85374cac4ae19f79c6f04
+version-2.2rc1 = b4abb4aa3fcfab41f910d93fba750677eb478440
+version-2.2a1 = 5bd0a1506a74e130529c63eb6d9ab157d436a866
+version-2.1 = 1182b768b19cc04dc99fa30b4e6f19f6ccac70c9
+version-2.1rc1 = c96a254d7cbb32a72dd9710cc032eaf6e7a239f8
+version-2.0 = da707e549701ef92cf1762628180622d19286bce
+version-2.0rc1 = 9b05d13418865482cbb83f47f18c566a712d581c
+version-1.99r7 = e323ae0d09abf670713ee24c7237cf13db2202a6
+version-1.99r6 = 5370dbae45938b2af4c641c133092802c173599f
+version-1.99r5 = 735bbf806d41b17d1c6237534584fbf660f3437e
+version-1.99r4 = 5a41f6a64c81b88677db08f3007583a62f30a2b8
+version-1.99r3 = 7e1703daf4ece493483f643adb62c0fa400995ca
+version-1.99r2 = 861359a37f289995fb2df0cca2334ba5ab9b196f
+version-1.99r1 = 4dbaa09d56ac569fb8563e89549199a1b534f5bd
+version-1.99 = 4972f60b1e8a307a63a7364666408b2367e4dd51
 version-1.34 = e0127485c8efbee7e1a45eef2aea8a1b702f5f07
 image = wmacpi.gif
 description = "This is port of WMApm 1.1 (see below) with ACPI support. Check 
README, and please report success/failure issues to me. Since I can't determine 
"time remaining" from the information provided, its value has been replaced 
with "system power load", which is roughly how much power is being used while 
on-battery. Note, this (for now) only supports laptops with one system battery. 
I am working with kernel acpi people to standartize power reporting interface, 
and when it's usable, WMApm will be updated to support any number of batteries, 
and provide full information about ACPI power sources. Right now, all I can say 
is that it works on my laptop :)"
-url = "http://www.ne.jp/asahi/linux/timecop/";
+url = "https://web.archive.org/web/20140630032948/http://himi.org/wmacpi/";
 dockapps = 32
 category = System Monitoring
 
+[wmacpi-ng]
+version-0.99 = 8412efc4a666a6cf47ecab09f1309789966635ca
+version-0.92 = 8e9a4f401aa0f29fb73d6f86f6291f67cced2257
+version-0.90 = e44783640e4557dfca57a6390616e36898054922
+version-0.50 = 0bb6be240ee924a85a0bcd865c64374c049d1d74
+image = wmacpi.gif
+description = "wmacpi-ng was a fork of wmacpi.  
Eventually, wmacpi-ng was blessed as the official version of wmacpi."
+url = "https://web.archive.org/web/20140630032948/http://himi.org/wmacpi/";
+dockapps =
+category = System Monitoring
+
 [wmacpiload]
 version-0.1.2+20140812 = d83cb5da968bd79448fa6af44895335cb7c548a1
 version-0.1.2 = f2dc21b803c6838a0608e1a82f3fd12846638c56
-- 
1.9.1


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.


[PATCH 2/3] update-dockapps.pl: Handle earlier versions of dockapps with alternate names.

2014-08-22 Thread Doug Torrance
Some dockapps earlier versions of dockapps, e.g. the recently added wmacpi-ng,
may have different names than the directories they appear in.  This patch adds
the ability to handle this situation by keeping track of the directory for
getting git information and skipping these dockapps when creating the "+date"
versions.
---
 update-dockapps.pl | 14 ++
 1 file changed, 14 insertions(+)

diff --git a/update-dockapps.pl b/update-dockapps.pl
index 65caa1b..ad25496 100755
--- a/update-dockapps.pl
+++ b/update-dockapps.pl
@@ -56,6 +56,13 @@ my $r = Git::Repository->new();
 my @tags = $r->run("tag");
 my %dockapps;
 
+# If any earlier versions of a dockapp had an alternate name, e.g. a name 
change
+# or a fork which has since been blessed, add it to this hash as 'alt' =>
+# 'main'.  The alternate should still have its own entry in dockapps.db.in.
+my %alts = (
+   'wmacpi-ng' => 'wmacpi'
+);
+
 foreach my $tag (@tags) {
$tag =~ /([\w\-+.]+)-([\w.]+)/;
my $dockapp = $1;
@@ -69,11 +76,18 @@ foreach my $tag (@tags) {
if (!$ls) {
$ls = $r->run("ls-tree", $tag, "$dockapp" . "_$version");
}
+#for alts
+   if (!$ls) {
+   $ls = $r->run("ls-tree", $tag, $alts{$dockapp});
+   }
my $sha1 = (split(/\s/, $ls))[2];
$dockapps{$dockapp}{$version} = $sha1;
 }
 
 foreach my $dockapp (keys %dockapps) {
+   if (grep {$_ eq $dockapp} keys %alts) {
+   next;
+   }
my $latest_version = (sort by_version keys $dockapps{$dockapp})[-1];
if ($r->run("diff", "$dockapp-$latest_version", "HEAD", $dockapp)) {
my $commit = $r->run("log", "-1",
-- 
1.9.1


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.


[PATCH 3/3] dockapps.db.in: Update wmacpi webpage, add wmacpi-ng.

2014-08-22 Thread Doug Torrance
---
 dockapps.db.in | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/dockapps.db.in b/dockapps.db.in
index 84ba1f6..700e83e 100644
--- a/dockapps.db.in
+++ b/dockapps.db.in
@@ -34,10 +34,17 @@ category = System Monitoring
 [wmacpi]
 image = wmacpi.gif
 description = "This is port of WMApm 1.1 (see below) with ACPI support. Check 
README, and please report success/failure issues to me. Since I can't determine 
"time remaining" from the information provided, its value has been replaced 
with "system power load", which is roughly how much power is being used while 
on-battery. Note, this (for now) only supports laptops with one system battery. 
I am working with kernel acpi people to standartize power reporting interface, 
and when it's usable, WMApm will be updated to support any number of batteries, 
and provide full information about ACPI power sources. Right now, all I can say 
is that it works on my laptop :)"
-url = "http://www.ne.jp/asahi/linux/timecop/";
+url = "https://web.archive.org/web/20140630032948/http://himi.org/wmacpi/";
 dockapps = 32
 category = System Monitoring
 
+[wmacpi-ng]
+image = wmacpi.gif
+description = "wmacpi-ng was a fork of wmacpi.  
Eventually, wmacpi-ng was blessed as the official version of wmacpi."
+url = "https://web.archive.org/web/20140630032948/http://himi.org/wmacpi/";
+dockapps =
+category = System Monitoring
+
 [wmacpiload]
 image = wmacpiload1.png
 description = "An app for monitoring CPU temp and battery time from ACPI. In 
the style of wmcpuload and wmapmload"
-- 
1.9.1


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.


[PATCH 1/3] update-dockapps.pl: Correctly sort alpha, beta, and release candidate versions.

2014-08-22 Thread Doug Torrance
---
 update-dockapps.pl | 14 +-
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/update-dockapps.pl b/update-dockapps.pl
index 53dde71..65caa1b 100755
--- a/update-dockapps.pl
+++ b/update-dockapps.pl
@@ -46,6 +46,7 @@ use warnings;
 use strict;
 use Git::Repository;
 use POSIX;
+use Debian::Dpkg::Version;
 
 open DB, "dockapps.db.in" or die $!;
 my $db = do { local $/;  };
@@ -73,7 +74,7 @@ foreach my $tag (@tags) {
 }
 
 foreach my $dockapp (keys %dockapps) {
-   my $latest_version = (sort keys $dockapps{$dockapp})[-1];
+   my $latest_version = (sort by_version keys $dockapps{$dockapp})[-1];
if ($r->run("diff", "$dockapp-$latest_version", "HEAD", $dockapp)) {
my $commit = $r->run("log", "-1",
  "--pretty=format:%H", $dockapp);
@@ -95,7 +96,7 @@ foreach my $dockapp (keys %dockapps) {
 
 foreach my $dockapp (keys %dockapps) {
my $versions = "";
-   foreach my $version (reverse sort keys $dockapps{$dockapp}) {
+   foreach my $version (reverse sort by_version keys $dockapps{$dockapp}) {
$versions .= "version-$version = " .
$dockapps{$dockapp}{$version} . "\n";
}
@@ -107,6 +108,9 @@ open DB, ">dockapps.db" or die $!;
 print DB $db;
 close DB;
 
-
-
-
+sub by_version {
+   (my $left = $a) =~ s/(a|b|rc)/~$1/;
+   (my $right = $b) =~ s/(a|b|rc)/~$1/;
+   Debian::Dpkg::Version->new($left) <=>
+   Debian::Dpkg::Version->new($right);
+}
-- 
1.9.1


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.


Re: [PATCH] wmaker: src/action.c merge duplicate code

2014-08-22 Thread David Maciejak
No problem i understand, enclosed the new patch.

On Fri, Aug 22, 2014 at 6:55 PM, Carlos R. Mafra  wrote:
>
> On Fri, 22 Aug 2014 at 15:22:16 +0800, David Maciejak wrote:
>> This patch is merging some duplicate code related
>> to animation position (I also fixed most of the errors reported by 
>> checkpatch).
>
> Sorry, I should have said this in your earlier patch.
>
> Don't mix substantial coding style changes with new code, that's a recipe
> to make things hard to debug.
>
> Just suppose for a moment that someone finds that this patch causes a problem
> (e.g. using 'git bisect'). Now one needs to understand what in this patch
> causes the problem and the amount of unrelated changes make the task a pain.
>
> And if we revert the patch, all the coding style changes will be gone too but
> they had nothing to do with the problem. That's a clear indication that the
> patch is doing 'more than one thing' at a time, which is not good.
>
> Sorry, but I cannot accept the patch right now. I suggest to split it; one
> doing purely style changes and the other merging the code.
>
>
> --
> To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.


0001-wmaker-src-action.c-merge-duplicate-code.patch
Description: Binary data


Re: [PATCH] wmaker: src/action.c merge duplicate code

2014-08-22 Thread Carlos R. Mafra

On Fri, 22 Aug 2014 at 15:22:16 +0800, David Maciejak wrote:
> This patch is merging some duplicate code related
> to animation position (I also fixed most of the errors reported by 
> checkpatch).

Sorry, I should have said this in your earlier patch.

Don't mix substantial coding style changes with new code, that's a recipe
to make things hard to debug.

Just suppose for a moment that someone finds that this patch causes a problem
(e.g. using 'git bisect'). Now one needs to understand what in this patch
causes the problem and the amount of unrelated changes make the task a pain.

And if we revert the patch, all the coding style changes will be gone too but
they had nothing to do with the problem. That's a clear indication that the
patch is doing 'more than one thing' at a time, which is not good.

Sorry, but I cannot accept the patch right now. I suggest to split it; one
doing purely style changes and the other merging the code.


-- 
To unsubscribe, send mail to wmaker-dev-unsubscr...@lists.windowmaker.org.


[PATCH] wmaker: src/action.c merge duplicate code

2014-08-22 Thread David Maciejak
This patch is merging some duplicate code related
to animation position (I also fixed most of the errors reported by checkpatch).

---
 src/actions.c | 110 ++
 1 file changed, 50 insertions(+), 60 deletions(-)

diff --git a/src/actions.c b/src/actions.c
index ae326a1..8a5ff82 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -60,12 +60,12 @@ static struct {
  int steps;
  int delay;
 } shadePars[5] = {
- {
- SHADE_STEPS_UF, SHADE_DELAY_UF}, {
- SHADE_STEPS_F, SHADE_DELAY_F}, {
- SHADE_STEPS_M, SHADE_DELAY_M}, {
- SHADE_STEPS_S, SHADE_DELAY_S}, {
-SHADE_STEPS_US, SHADE_DELAY_US}};
+ { SHADE_STEPS_UF, SHADE_DELAY_UF },
+ { SHADE_STEPS_F, SHADE_DELAY_F },
+ { SHADE_STEPS_M, SHADE_DELAY_M },
+ { SHADE_STEPS_S, SHADE_DELAY_S },
+ { SHADE_STEPS_US, SHADE_DELAY_US }
+};

 #define UNSHADE 0
 #define SHADE   1
@@ -84,7 +84,8 @@ static int compareTimes(Time t1, Time t2)
 #ifdef ANIMATIONS
 static void shade_animate(WWindow *wwin, Bool what);
 #else
-static inline void shade_animate(WWindow *wwin, Bool what) {
+static inline void shade_animate(WWindow *wwin, Bool what)
+{
  /*
  * This function is empty on purpose, so tell the compiler
  * to not warn about parameters being not used
@@ -291,9 +292,9 @@ void wUnshadeWindow(WWindow *wwin)
 static void save_old_geometry(WWindow *wwin, int directions)
 {
  /* never been saved? */
- if (! wwin->old_geometry.width)
+ if (!wwin->old_geometry.width)
  directions |= SAVE_GEOMETRY_X | SAVE_GEOMETRY_WIDTH;
- if (! wwin->old_geometry.height)
+ if (!wwin->old_geometry.height)
  directions |= SAVE_GEOMETRY_Y | SAVE_GEOMETRY_HEIGHT;

  if (directions & SAVE_GEOMETRY_X)
@@ -584,8 +585,7 @@ static void find_Maximus_geometry(WWindow *wwin,
WArea usableArea, int *new_x, i
  remember_geometry(wwin, &orig.left, &orig.top, &orig.width, &orig.height);
  orig.bottom = orig.top + orig.height;
  orig.right = orig.left + orig.width;
- }
- else
+ } else
  set_window_coords(wwin, &orig);

  /* Try to fully maximize first, then readjust later */
@@ -862,6 +862,7 @@ animateResizeTwist(WScreen *scr, int x, int y, int
w, int h, int fx, int fy, int
  points[3].y = cy + sin(angle + a + WM_PI) * d;
  points[4].x = cx + cos(angle - a) * d;
  points[4].y = cy + sin(angle - a) * d;
+
  XGrabServer(dpy);
  XDrawLines(dpy, scr->root_win, scr->frame_gc, points, 5, CoordModeOrigin);
  XFlush(dpy);
@@ -1038,7 +1039,7 @@ static void mapTransientsFor(WWindow *wwin)
  }
 }

-static WWindow *recursiveTransientFor(WWindow * wwin)
+static WWindow *recursiveTransientFor(WWindow *wwin)
 {
  int i;

@@ -1060,7 +1061,35 @@ static WWindow *recursiveTransientFor(WWindow * wwin)
  return wwin;
 }

-void wIconifyWindow(WWindow * wwin)
+static int getAnimationGeometry(WWindow *wwin, int *ix, int *iy, int
*iw, int *ih)
+{
+ if (!wwin->screen_ptr->flags.startup && !wPreferences.no_animations
+ && !wwin->flags.skip_next_animation && wwin->icon != NULL) {
+ if (!wPreferences.disable_miniwindows
+&& !wwin->flags.net_handle_icon) {
+ *ix = wwin->icon_x;
+ *iy = wwin->icon_y;
+ *iw = wwin->icon->core->width;
+ *ih = wwin->icon->core->height;
+ } else {
+ if (wwin->flags.net_handle_icon) {
+ *ix = wwin->icon_x;
+ *iy = wwin->icon_y;
+ *iw = wwin->icon_w;
+ *ih = wwin->icon_h;
+ } else {
+ *ix = 0;
+ *iy = 0;
+ *iw = wwin->screen_ptr->scr_width;
+ *ih = wwin->screen_ptr->scr_height;
+ }
+ }
+ return 1;
+ }
+ return 0;
+}
+
+void wIconifyWindow(WWindow *wwin)
 {
  XWindowAttributes attribs;
  int present;
@@ -1137,6 +1166,9 @@ void wIconifyWindow(WWindow * wwin)
  unmapTransientsFor(wwin);

  if (present) {
+#ifdef ANIMATIONS
+ int ix, iy, iw, ih;
+#endif
  XUngrabPointer(dpy, CurrentTime);
  wWindowUnmap(wwin);
  /* let all Expose events arrive so that we can repaint
@@ -1150,28 +1182,7 @@ void wIconifyWindow(WWindow * wwin)

  flushExpose();
 #ifdef ANIMATIONS
- if (!wwin->screen_ptr->flags.startup && !wwin->flags.skip_next_animation
-&& !wPreferences.no_animations) {
- int ix, iy, iw, ih;
-
- if (!wPreferences.disable_miniwindows && !wwin->flags.net_handle_icon) {
- ix = wwin->icon_x;
- iy = wwin->icon_y;
- iw = wwin->icon->core->width;
- ih = wwin->icon->core->height;
- } else {
- if (wwin->flags.net_handle_icon) {
- ix = wwin->icon_x;
- iy = wwin->icon_y;
- iw = wwin->icon_w;
- ih = wwin->icon_h;
- } else {
- ix = 0;
- iy = 0;
- iw = wwin->screen_ptr->scr_width;
- ih = wwin->screen_ptr->scr_height;
- }
- }
+ if (getAnimationGeometry(wwin, &ix, &iy, &iw, &ih)) {
  animateResize(wwin->screen_ptr, wwin->frame_x, wwin->frame_y,
   wwin->frame->core->width, wwin->frame->core->height, ix, iy, iw, ih);
  }
@@ -1291,34 +1302,13 @@ void wDeiconifyWindow(WWindow *wwin)
  /* if the window is in another workspace, do it silently */
  if (!netwm_hidden) {
 #ifdef ANIMATIONS
- if (!wwin->screen_ptr->flags.startup && !wPreferences.no_animations
-&& !wwin->flags.skip_next_animation && wwin->icon != NULL) {
- int ix, iy, iw, ih;
-
- if (!wPreferences.disable_m