Subject: Re: FVWM: Still slight cosmetic problem with HGradient menus

From: John Latham <[email-masked]>
Date: Thu, 5 Sep 2002 20:07:22 +0100

> Date: Thu, 5 Sep 2002 18:31:34 +0000
> From: Mikhael Goikhman <[email-masked]>

> On 05 Sep 2002 18:55:26 +0100, John Latham wrote:
> > 
> > Possible bad news -- maybe you are aware of these, but just in case:
> > 
> > 1) 	Menus do not stay up like they used to. With
> > 
> > 		Mouse 1         R       A       Menu StartMenu Nop
> > 
> > 	a single click on the root window used to make the menu stay up. Now,
> > 	it appears and disappears as soon as you let go of the mouse.
> > 
> >  And
> > 
> > 		AddToMenu XXX
> > 		+ "blah blah" PopUp SubMenuYYY
> > 
> > 	used to make SubMenuYYY stay up if you clicked on the item in XXX.
> > 	(This was with PopupAsRootMenu style.)
>
> If you use the cvs or daily snapshots regularly you should subscribe to
> the fvwm-workers list to be up to date with what happens.
>
> You would see that this problem was reported and answered, but not fixed.
>
> You would also see the Dominik's request not to use the today's cvs
> because it will crash.

Ooops, sorry. I don't regularly use the snapshots, though I might start doing
at some point, so I might be of more help to you. Dominic asked me to try his
latest menu patch to check if the cosmetic problem was gone, and I figured the
snapshot was the easiest way to get it.

>
> > 2)	I was able to get a maximize button to become `stuck', in the sense
> > 	that every thing I clicked would be toggle maximised -- not even just
> > 	the window that the button belonged to! Clicking on the root window
> > 	would make it look like everything was normal, but as soon as the
> > 	mouse was even moved the original ``sticky button'' would display it's
> > 	ActiveDown mini-icon again. Even killing the program which the sticky
> > 	button window belonged to (via another console) did not resolve the
> > 	problem: the skeleton of it remained on the screen. Only killing X
> > 	could stop it. I was able to invoke this feature twice, but did not
> > 	spend a long time working out exactly what magic sequence was needed.
> > 	I think it involves the window being resized by itself, and/or moved
> > 	by itself prior to clicking the button.
> > 
> > 	Would you like me to try to find a more definitive sequence of events,
> > 	or is somebody already onto this bug?
>
> This problem is not known. I don't quite understand what "every thing I
> clicked would be toggle maximised" means. Please post all ButtonStyle and
> other related lines.

Imagine a new feature (which might even be useful!) called
``PointerIsAMagicWand'' which when set would be given a function and would
then apply that function to every window you clicked on. (I don't know how you
could turn it off!) Anyway, the behaviour I was getting was as though I had
asked for

	PointerIsAMagicWand Maximise 100 97

The button I originally pressed was bound to Maximise 100 97.

I mean, every window I left-clicked on was maximized / de-maximized and
nothing could stop it. This included pager, buttons, task bar, etc.. Also, the
mini-icon decoration for the ActiveDown of the button I had originally pressed
was showing all the time. Left clicking on the root window did nothing except
make the ActiveDown mini-icon be replaced by the normal one. But when the
mouse was moved, even slightly, the ActiveDown mini-icon reappeared.

I attach the ButtonStyles and Mouse bindings which I think were in use at the
time.

I'll try to make it happen again, to search for a minimal sequence of steps
from start up to invoke it. Both times it happened it was with the same
particular PerlTk application. I suspect that one of the steps needed to
invoke the feature is to ask this application to move itself: I have bound the
right mouse button to act as a `grab and move' function for this application
(because it has lots of little windows). Both times I had done that shortly
before pressing the maximise button.

> Regards,
> Mikhael.

Best wishes, John Latham

==========================================================

Here are the ButtonStyle, Mouse and Syle NoButton settings. These are
generated from M4 defines which explains some of the strangeness in them.
(E.g. ButtonStyles for buttons which are not used).

ButtonStyle 1	ActiveUp	Pixmap /home/jtl/XFILES/DEVEL/etc/X11/AnotherLevel/BUTTONS/White/menu.xpm -- UseTitleStyle Sunk
ButtonStyle 1	ActiveDown	Pixmap /usr/share/icons/mini/mini-ray.xpm -- UseTitleStyle Sunk
ButtonStyle 1	Inactive	Simple -- UseTitleStyle Sunk

ButtonStyle 2	ActiveUp	Pixmap /home/jtl/XFILES/DEVEL/etc/X11/AnotherLevel/BUTTONS/White/close.xpm -- UseTitleStyle Sunk
ButtonStyle 2	ActiveDown	Pixmap /usr/share/icons/mini/mini-ray.xpm -- UseTitleStyle Sunk
ButtonStyle 2	Inactive	Simple -- UseTitleStyle Sunk

ButtonStyle 3	ActiveUp	Pixmap /home/jtl/XFILES/DEVEL/etc/X11/AnotherLevel/BUTTONS/White/stick.xpm -- UseTitleStyle Sunk
ButtonStyle 3	ActiveDown	Pixmap /usr/share/icons/mini/mini-ray.xpm -- UseTitleStyle Sunk
ButtonStyle 3	Inactive	Simple -- UseTitleStyle Sunk

ButtonStyle 4	ActiveUp	Pixmap /home/jtl/XFILES/DEVEL/etc/X11/AnotherLevel/BUTTONS/White/maximize.xpm -- UseTitleStyle Sunk
ButtonStyle 4	ActiveDown	Pixmap /usr/share/icons/mini/mini-ray.xpm -- UseTitleStyle Sunk
ButtonStyle 4	Inactive	Simple -- UseTitleStyle Sunk

ButtonStyle 5	ActiveUp	Pixmap /home/jtl/XFILES/DEVEL/etc/X11/AnotherLevel/BUTTONS/White/shade.xpm -- UseTitleStyle Sunk
ButtonStyle 5	ActiveDown	Pixmap /usr/share/icons/mini/mini-ray.xpm -- UseTitleStyle Sunk
ButtonStyle 5	Inactive	Simple -- UseTitleStyle Sunk

ButtonStyle 6	ActiveUp	Pixmap /home/jtl/XFILES/DEVEL/etc/X11/AnotherLevel/BUTTONS/White/minimize.xpm -- UseTitleStyle Sunk
ButtonStyle 6	ActiveDown	Pixmap /usr/share/icons/mini/mini-ray.xpm -- UseTitleStyle Sunk
ButtonStyle 6	Inactive	Simple -- UseTitleStyle Sunk

ButtonStyle 7	ActiveUp	 -- UseTitleStyle Sunk
ButtonStyle 7	ActiveDown	Pixmap /usr/share/icons/mini/mini-ray.xpm -- UseTitleStyle Sunk
ButtonStyle 7	Inactive	Simple -- UseTitleStyle Sunk

ButtonStyle 8	ActiveUp	Pixmap /home/jtl/XFILES/DEVEL/etc/X11/AnotherLevel/BUTTONS/White/tall-maximize.xpm -- UseTitleStyle Sunk
ButtonStyle 8	ActiveDown	Pixmap /usr/share/icons/mini/mini-ray.xpm -- UseTitleStyle Sunk
ButtonStyle 8	Inactive	Simple -- UseTitleStyle Sunk

ButtonStyle 9	ActiveUp	 -- UseTitleStyle Sunk
ButtonStyle 9	ActiveDown	Pixmap /usr/share/icons/mini/mini-ray.xpm -- UseTitleStyle Sunk
ButtonStyle 9	Inactive	Simple -- UseTitleStyle Sunk

ButtonStyle 0	ActiveUp	Pixmap /home/jtl/XFILES/DEVEL/etc/X11/AnotherLevel/BUTTONS/White/wide-maximize.xpm -- UseTitleStyle Sunk
ButtonStyle 0	ActiveDown	Pixmap /usr/share/icons/mini/mini-ray.xpm -- UseTitleStyle Sunk
ButtonStyle 0	Inactive	Simple -- UseTitleStyle Sunk

Style "*" NoButton 7
Style "*" NoButton 9

Mouse 1		R   	A       Menu StartMenu Nop
Mouse 2		R	A	WindowList
Mouse 3		R	A	Menu AUTO_WM_CONFIG Nop
Mouse 1		T 	A	Function "Move-or-Raise-or-Maximize"
Mouse 1		FS 	A	Resize
Mouse 2		FST 	A	Menu "Window-Ops" Nop
Mouse 3		TSIF 	A	RaiseLower
Mouse 1		A 	CSM	RaiseLower
Mouse 2		A 	CSM	Function "Move-or-Raise"
Mouse 3		A 	CSM	Function "Resize-or-Raise"
Mouse 1		I 	A	Function "Iconify-move-maximize"
Mouse 2		I 	A 	Menu "Window-Ops" Nop
Mouse 3		I 	A	Function "Iconify-maximize"
Mouse 2         R       A       WindowList Alphabetic

Mouse 0	1 A	Menu Window-Ops Close
Mouse 0	2 A	Close
Mouse 0	3 A	Stick
Mouse 0	4 A	Maximize 100 97
Mouse 0	5 A	WindowShade
Mouse 0	6 A	Iconify
Mouse 0	7 A	-
Mouse 0	8 A	Maximize 0 97
Mouse 0	9 A	-
Mouse 0	0 A	Maximize 100 0
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Mikhael Goikhman <[email-masked]>
Date: Thu, 5 Sep 2002 22:25:07 +0000

> > You would also see the Dominik's request not to use the today's cvs

Actually today it only failes to compile, crashes are promised later. ;)

> The button I originally pressed was bound to Maximise 100 97.

This feature is easy to implement in 2.5.1+:

  # repeat command until escape is pressed or root window selected
  DestroyFunc RepeatUntilCanceled
  AddToFunc   RepeatUntilCanceled
  + I Pick $*
  + I Cond (Error) Break
  + I RepeatUntilCanceled $*

  RepeatUntilCanceled Maximize 100 0
  RepeatUntilCanceled UnshadeAndIconify

But Pick is broken for some time now, so _currently_ RepeatUntilCanceled
does nothing.

Regards,
Mikhael.