Subject: CVS dane: * FvwmAnimate/FvwmAnimate.c: Add ability to accept animate commands

From: CVS <[email-masked]>
Date: Sat, 21 Aug 1999 15:21:44 -0500 (CDT)

CVSROOT:	/home/cvs/fvwm
Module name:	fvwm
Changes by:	dane	99/08/21 15:21:44

Modified files:
	.              : ChangeLog NEWS 
	modules        : ChangeLog 
	modules/FvwmAnimate: FvwmAnimate.1 FvwmAnimate.c 

Log message:
* FvwmAnimate/FvwmAnimate.c: Add ability to accept animate commands
thru "sendtomodule".

* FvwmAnimate/FvwmAnimate.1: document "sendtomodule animate" command.

* NEWS: Describe FvwmAnimate "sendtomodule" command for arbitrary animation.

(FvwmAnimate accepts "animate" commands from other modules or
other sources of commands thru "sendtomodule".)

--
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: Dominik Vogt <[email-masked]>
Date: Mon, 23 Aug 1999 13:31:12 +0200

> other sources of commands thru "sendtomodule".)

Dan, is it already possible to duplicate the 'sliding' effect
FvwmButtons currently uses for its panels?

Bye

Dominik ^_^

-- 
Dominik Vogt, Hewlett-Packard GmbH, Dept. BVS
Herrenberger Str.130, 71034 Boeblingen, Germany
phone: 07031/14-4596, fax: 07031/14-3883, [email-masked]
--
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: Dan Espen <[email-masked]>
Date: Mon, 23 Aug 1999 08:08:55 -0400

> FvwmButtons currently uses for its panels?

FvwmAnimate produces a different kind of animation.
(Sort of zoom lines to show the path the window took when it changed from
a window to an icon.)

--
Dan Espen
444 Hoes Lane  Room RRC 1C-214           E-mail: [email-masked]
Piscataway, NJ 08854                     Phone: (732) 699-5570
--
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: Tim Phipps <[email-masked]>
Date: Mon, 23 Aug 1999 13:14:37 +0100

> (Sort of zoom lines to show the path the window took when it changed from

It might be useful if the sendtomodule command could specify the
animation type (an optional 9th arg) so that a module could pick the
animation style without affecting the users choice for normal
iconification.

Cheers,
Tim.

---

From: Dominik Vogt <[email-masked]>
Date: Mon, 23 Aug 1999 14:22:59 +0200

> animation style without affecting the users choice for normal

Yup, that's what we need to get the 'sliding' effect for FvwmButtons.

Bye

Dominik ^_^

---

From: Dan Espen <[email-masked]>
Date: Mon, 23 Aug 1999 08:33:28 -0400

> Yup, that's what we need to get the 'sliding' effect for FvwmButtons.

Try this:

*FvwmAnimateDelay 100
*FvwmAnimateEffect Lines
SendToModule FvwmAnimate animate 10 10 100 100 500 500 100 100
*FvwmAnimateEffect Twist
SendToModule FvwmAnimate animate 500 500 100 100 10 10 100 100
*FvwmAnimateEffect Lines
SendToModule FvwmAnimate animate 10 10 100 100 500 500 100 100
*FvwmAnimateEffect Twist
SendToModule FvwmAnimate animate 500 500 100 100 10 10 100 100
DestroyModuleConfig FvwmAnimate*

You need to do "DestroyModuleConfig" once and a while to
not have a memory leak.

You can use an alias for FvwmAnimate to not affect other animations.

---

From: Tim Phipps <[email-masked]>
Date: Mon, 23 Aug 1999 13:50:55 +0100

> DestroyModuleConfig FvwmAnimate*
This leaves FvwmAnimate in twist mode. My default mode is Random and I
don't want it being changed by a module that is using FvwmAnimate for
its own animations. What I'd really like is to be able to do:

SendToModule FvwmAnimate animate 500 500 100 100 10 10 100 100 Twist

And for FvwmAnimate to do a twist and then go back to Random mode for
icons.

> You need to do "DestroyModuleConfig" once and a while to

Having the optional mode means no memeory leaks.

> You can use an alias for FvwmAnimate to not affect other animations.

Do you think that FvwmButtons should start its own FvwmAnimate with an
alias?  I suppose it could be called FvwmButtonsAnimate but how do you
stop FvwmButtonsAnimate from doing the animations for other windows that
get iconified?

Cheers,
Tim.

---

From: Dominik Vogt <[email-masked]>
Date: Mon, 23 Aug 1999 14:59:48 +0200

> DestroyModuleConfig FvwmAnimate*

Okay, that solves one part of the problem. With the 'Frame'
animation we can get the 'expanding box' effect. (Though I
still think an optional pagameter for the SendToModule would
be nice). Now we need a bit more sophisticated animations:
Just animating a wire frame is not quite what we want. The
window itself needs to be animated.

> You need to do "DestroyModuleConfig" once and a while to

Can this be fixed? :-)

Bye

Dominik ^_^

---

From: Dominik Vogt <[email-masked]>
Date: Mon, 23 Aug 1999 15:02:45 +0200

> stop FvwmButtonsAnimate from doing the animations for other windows that

I wouldn't do that. I'd simply require FvwmAnimate to be running
to get the 'sliding' effect. We do this with FvwmTheme already.

Bye

Dominik ^_^

---

From: Dan Espen <[email-masked]>
Date: Mon, 23 Aug 1999 09:00:50 -0400

> stop FvwmButtonsAnimate from doing the animations for other windows that

Yes, after I sent my last mail, I thought about it a few minutes
and realized that all those qualifications, point out that the above
is NOT the way to go about this.

It would seem to me that color, delay, line width and iterations might
need control also.

Meanwhile, back to FvwmButtons panels, the panels slid out themselves,
since FvwmAnimate XORs its animation onto the screen, it needs to grab
the server during animation.  Its not clear to me how the panel could
slide out and have zoom lines at the same time.

---

From: Dominik Vogt <[email-masked]>
Date: Mon, 23 Aug 1999 15:24:29 +0200

> slide out and have zoom lines at the same time.

Nope, I'd rather have FvwmAnimate doing all animation and FvwmButtons
none. This way needs some more functionality as pointed out in my previous
mail.

Bye

Dominik ^_^

---

From: Brad Giaccio <[email-masked]>
Date: Mon, 23 Aug 1999 09:26:07 -0400

> none. This way needs some more functionality as pointed out in my previous

Just aa thought but the window shade feature really does what we
want here.  Could we move that code into libs and just call it from
FvwmButtons??  [I haven't looked at the window shade code so I don't
know if this is possible]

Brad

-- 
--- There are two kinds of knowledge, you either know the answer or
			you know where to find it
		      -Kane, Johnson, and anonymous
--
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: Dan Espen <[email-masked]>
Date: Mon, 23 Aug 1999 09:37:07 -0400

> none. This way needs some more functionality as pointed out in my previous

While is seems logical that all animation take place in one module,
I think I agree with Brad.  This looks more like a library function.

I don't see what you would send to FvwmAnimate to have a Panel
slide out.  The window isn't on the screen anywhere, so you'd have to
send the entire window content.  (I think.)

---

From: Dominik Vogt <[email-masked]>
Date: Mon, 23 Aug 1999 16:15:49 +0200

On Mon, Aug 23, 1999 at 09:37:07AM -0400, [email-masked] wrote:
> slide out.

The window ID, the start and end rectangle and the sliding method
(left, right, up, down). For example:

  SendToModule FvwmAnimate x11 y11 x12 y12 x21 y21 x22 y22 slide-left 0x300000a

> The window isn't on the screen anywhere, so you'd have to

FvwmAnimate could map the window itself. Of course it would be easier
to get FvwmButtons running with library functions. But I'd like to
enhance FvwmAnimate anyway: what I imagine are animations when windows
are mapped and unmapped, just like you see in movies: first, a dark
green frame is drawn, then a grid, and then the window flickers a bit
before it maps :-) We wouldn't want to have all this code in several
modules *and* fvwm itself, right?

Bye

Dominik ^_^

---

From: Dan Espen <[email-masked]>
Date: Wed, 25 Aug 1999 08:45:29 -0400

Dominik Vogt <[email-masked]> writes:
> > > none. This way needs some more functionality as pointed out in my
> > > previous mail.
> > 

This sounds interesting.   I think you are telling  me  that a program
can  get the content of  a window  using  a window ID  even before its
mapped.  We could even do those winXX type title bar animations.
(Not that I like them.)

The reason I changed FvwmAnimate to  accept the "SendToModule" command
was  to     enable  animations for   FvwmTaskbar,    FvwmIconman,  and
FvwmIconbox.   If someone wants  to take that  on, I think FvwmAnimate
will support that quite nicely in its current state.

---

From: Dominik Vogt <[email-masked]>
Date: Wed, 25 Aug 1999 17:20:12 +0200

On Wed, Aug 25, 1999 at 08:45:29AM -0400, [email-masked] wrote:
> mapped.

Well, if it has never been mapped before this might be a problem :)
But in the end I see no reason why the window shouldn't get expose
events for each state of the animation. Might be too slow for some
applications. Hmm, this will probably only work nicely with
background storage. We could set the backing storage attribute
to always for the window being animated and hope the X server
does the right thing. Hmm - hmmmm, how does FvwmButtons do this
at the moment?

>  We could even do those winXX type title bar animations.
> (Not that I like them.)

Shudder!

Bye

Dominik ^_^

---

From: Dominik Vogt <[email-masked]>
Date: Wed, 25 Aug 1999 17:33:45 +0200

> does the right thing. Hmm - hmmmm, how does FvwmButtons do this

What about shaping the window? If a window has a shape mask with
only the top left and the lower right pixel set, would it get
an Expose event for the complete window?

Bye

Dominik ^_^

---

From: Brad Giaccio <[email-masked]>
Date: Thu, 26 Aug 1999 10:14:41 -0400

> will support that quite nicely in its current state.

Dan, I almost have FvwmAnimate working with FvwmIconMan.  My only
problem is on a deiconify I usually see the window get mapped then the
message gets toFvwmAnimate.  Is there anyway that you know of to delay
the deiconification until Animate finishes?

Brad

---

From: Dan Espen <[email-masked]>
Date: Thu, 26 Aug 1999 10:52:21 -0400

> the deiconification until Animate finishes?

I don't think its going to be easy.

FvwmAnimate is using M_LOCKONSEND so that fvwm2 doesn't progress
until it gets a response from FvwmAnimate.  You could do the same thing
with FvwmIconMan.  I don't think thats going to cover the whole
process through, the "sendtomodule" command will let fvwm2 proceed.

I was hoping  the  lack of synchronization  wouldn't hurt  the  effect
much.

---

From: Dominik Vogt <[email-masked]>
Date: Thu, 26 Aug 1999 17:05:11 +0200

> the deiconification until Animate finishes?

All modules will have this problem. I think we need generic way of
synchronizing other modules with FvwmAnimate. Couldn't the requesting
module provide its name with the command and then wait for FvwmAnimate
to send back a notification that the animation has finished?

Bye

Dominik ^_^

---

From: Tim Phipps <[email-masked]>
Date: Thu, 26 Aug 1999 17:06:54 +0100

> the deiconification until Animate finishes?

I got half way through making FvwmWinList do the same (then I realized
it din't know where the window was located) and I gave up when I saw
this.

I don't think there is an easy way to get fvwm to pause in the middle of
iconifying a window and yet continue to pass messages between modules.

I think a better solution to this is for the modules to tell FvwmAnimate
where to animate NoIcon windows to i.e. have it handle:

SendToModule FvwmAnimate NoIconLocation windowid x y width height

FvwmAnimate can then do the animation at the right time and fvwm will
wait for it (it uses M_LOCKONSEND).

It means that FvwmAnimate will need 4 extra ints per window, initially
set to 0 and when it sees an M_ICONIFY with width & height set to zero
(i.e. a NoIcon window) it substitues the NoIconLocation numbers for the
M_ICONIFY packet numbers.

Cheers,
Tim.

---

From: Dan Espen <[email-masked]>
Date: Thu, 26 Aug 1999 19:35:57 -0400

> I was hoping  the  lack of synchronization  wouldn't hurt  the  effect

Looking thru the code, I think making FvwmIconMan an M_LOCKONSEND
module is at least worth trying.

Be careful about any X grabs.

---

From: Dan Espen <[email-masked]>
Date: Thu, 26 Aug 1999 19:49:15 -0400

> it din't know where the window was located) and I gave up when I saw

M_ICONIFY and M_DEICONIFY both have the window locations don't they?

> M_ICONIFY packet numbers.

I think I'd have to try it to be sure, but in module_interface.c
any commands it gets from a lockonsend module, it hands off to
HandleModuleInput which I think can make it wait for another lock on
send, then return to the previous one.

---

From: Tim Phipps <[email-masked]>
Date: Fri, 27 Aug 1999 14:03:13 +0100

> M_ICONIFY and M_DEICONIFY both have the window locations don't they?

Yes they do, but I was using the doc's and I hadn't updated for ages.

Cheers,
Tim.