On Fri, Jul 23, 2004 at 05:13:13PM +1000, Scott Smedley wrote:
> Hi Dominik, :)
> 
> > It seems to happen only if a function is called, not with plain
> > commands.  Try
> > 
> >   DestroyFunc foo
> >   AddToFunc foo I nop
> >   DestroyModuleConfig FvwmButtons*
> >   *FvwmButtons: ActiveColorset 2
> >   *FvwmButtons(Title foo, Action foo)
> >   Module FvwmButtons
> 
> This is a bizarre bug!
> 
> The button is actually redrawn (correctly) with the active colorset, but
> the FvwmButtons module immediately receives a LeaveNotify event (I don't
> move the mouse) & redraws the button with the standard colorset
> (thinking that the mouse cursor is no longer in the FvwmButtons window).
> 
> You can also do:
> 
> sleep 6 && FvwmCommand foo
> 
> whip the mouse into _any_ button & wait for the LeaveNotify event
> to get triggered (causing the active button to be drawn in the standard
> colorset, instead of the active one).
> 
> So, why does invoking function "foo" cause FvwmButtons to receive an
> erroneous LeaveNotify event?

I don't think the event is wrong.  When a complex function is
executed, fvwm grabs the pointer.  This automatically generates a
LeaveNotify event for the window that contained the pointer and an
EnterNotify EnterNotify for the window that grabbed the button.
When the grab is released, the opposite events are generated.

FvwmButtons handles LeaveNotify events only, so the final
LeaveNotify unhilights the button.  I've committed a fix.

Also, drawing of panel buttons was wrong during the panel
animation (fixed too).

Finally, there is still the issue that empty buttons that are
waiting for their application to be spawned are drawn in the
PressColorset.  This may be good for buttons that spawn their
application with a click, but is ugly for all other buttons
because of the flashing at startup.  I've made a patch that uses
said behaviour only for buttons with the UseOld flag set, but I
think it should be removed completely.  If such a feature is
worthwhile it use an entirely separate colour set (SwallowColorset
or WaitColorset or ...).

Ciao

Dominik ^_^  ^_^

 --
Dominik Vogt, [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]

Attachment: pgpuWEbhTr4zq.pgp
Description: PGP signature

Reply via email to