Subject: Animation patch for FvwmIconMan

From: Brad Giaccio <[email-masked]>
Date: Tue, 26 Oct 1999 10:16:54 -0400

Well I finally got around to implementing this, it seems to work fine
with my config and the default config.  I couldn't get a deadlock so
everything should be okay.

Brad

-- 
--- There are two kinds of knowledge, you either know the answer or
			you know where to find it
		      -Kane, Johnson, and anonymous

---

From: Tim Phipps <[email-masked]>
Date: Tue, 26 Oct 1999 16:21:03 +0100

> everything should be okay.

Thanks, works nicely.  It seems to get the coordinates wrong if
FvwmIconMan is swallowed. I think it needs an XTranslateCoordinates() to
get the right number.

Cheers,
Tim.
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Brad Giaccio <[email-masked]>
Date: Tue, 26 Oct 1999 11:30:43 -0400

Oops forgot the changelog.

1999-10-26  Brad Giaccio  <[email-masked]>

    * FvwmIconMan/FvwmIconMan.c (main):
    * FvwmIconMan/fvwm.c (ProcessMessage):
    * FvwmIconMan/xmanager.c (set_win_iconified):
    * FvwmIconMan/readconfig.c (read_in_resources):
    * FvwmIconMan/FvwmIconMan.1: implemented NoIconAction for FvwmIconMan,
    now does animation.

---

From: Brad Giaccio <[email-masked]>
Date: Tue, 26 Oct 1999 12:04:09 -0400

> FvwmIconMan is swallowed. I think it needs an XTranslateCoordinates() to

Worse than that it would get the wrong coordinates if you moved the
manger.  I was foolishlly assuming win->manager->geometry.x, and
win->manager->geometry.y were actually being updated somewhere.  Silly
me.

Here is the fix
Index: xmanager.c
===================================================================
RCS file: /home/cvs/fvwm/fvwm/modules/FvwmIconMan/xmanager.c,v
retrieving revision 1.21
diff -u -b -B -r1.21 xmanager.c
--- xmanager.c  1999/10/26 15:19:54     1.21
+++ xmanager.c  1999/10/26 16:02:53
@@ -652,18 +652,22 @@
      * eventually be. */
     if (win->manager->AnimCommand && (win->manager->AnimCommand[0] != 0)
        && (win->button->w != 0) && (win->button->h !=0) ) {
+      int x,y;
+      Window child;
+      XTranslateCoordinates(theDisplay, win->manager->theWindow, theRoot, 
+                            0, 0, &x, &y,&child);
       if (iconified) {
         sprintf(string, "%s %d %d %d %d %d %d %d %d",
                 win->manager->AnimCommand,
                 win->x, win->y, win->width, win->height,
-                win->manager->geometry.x + win->button->x,
-                win->manager->geometry.y + win->button->y,
+                x + win->button->x,
+                y + win->button->y,
                 win->button->w, win->button->h);
       } else {
         sprintf(string, "%s %d %d %d %d %d %d %d %d",
                 win->manager->AnimCommand,
-                win->manager->geometry.x + win->button->x,
-                win->manager->geometry.y + win->button->y,
+                x + win->button->x,
+                y + win->button->y,
                 win->button->w, win->button->h,
                 win->x, win->y, win->width, win->height);
       }