Action does not work for Swallowed Apps (FvwmButtons)

When I click onto the swallowed app, nothing happens. If I set a border or title I can click it and the “Action” command starts. So this looks like a pre 2.5.x behaviour, but I have 2.5.12 here.

… I read the FAQ and man page of FvwmButtons, so I know it should work, I even googled for other people’s configs and tested them, but it does not work for me.

Please consider:

[code]Style FvwmDock NoTitle, StaysOnBottom, Sticky, WindowListSkip,
CirculateSkipIcon, CirculateSkip, HandleWidth 0, BorderWidth 0

DestroyModuleConfig FvwmDock: *
*FvwmDock: BoxSize fixed
*FvwmDock: Colorset 4
*FvwmDock: Rows 1
*FvwmDock: Columns 5
*FvwmDock: Geometry 640x136-5-0
*FvwmDock: Padding 0 0
*FvwmDock: Frame 0
*FvwmDock: (2x1, Swallow “xpad” Exec exec xpad )
*FvwmDock: (2x1, Swallow “xlock” Exec exec xclock, Action exec xload )
*FvwmDock: (1x1, Swallow “xbiff” Exec exec xbiff, Action ‘exec xclock’, )
[/code]

Is there some secret option, do I have to add xorg.conf settings? Does anyone have an idea?

More info:

[code]> fvwm -V
fvwm 2.5.12 compiled on Aug 10 2005 at 15:10:43
with support for: ReadLine, XPM, PNG, Shape, XShm, SM, Xinerama, XRender, XFT, NLS

uname -a
Linux paris 2.6.11.4-21.8-smp #1 SMP Tue Jul 19 12:42:37 UTC 2005 i686 i686 i386 GNU/Linux
cat /etc/SuSE-release
SuSE Linux 9.3 (i586)
VERSION = 9.3
[/code]

apl

The second Swallow looks alright to me, the third one has a trailing comma that doesn’t belong there.

For the record, this is what I use (well, this worked for me rather, I don’t actually use it):

*SideBar: (5x1+0+3, Swallow (UseOld) "FvwmApplet-DigitalClock" `FvwmScript $[FVWM_USERDIR]/scripts/FvwmApplet-DigitalClock 2`, Action  `exec xclock`)

You might want to check ~/.xsession-errors for errors if Fvwm logs to that file.

Right. My error when cleaning up the example. I don’t think this is a problem with my config. Whatever config suggested by others I use, clicking on the swallowed app does nothing.

This is all I have there.

_cdim: --- not moved 0x081eaee0 'CAST:'

Could the problem be X related?
apl

The error is with the line above. Look at it. You’re trying to get it to swallow xclock, yet the hangon name you’re giving it is “xlock”. It’s important to remmber that the hangon is usually the title of the application. So changing xlock to “xclock” will fix it.

– Thomas Adam

Right. I should paste real code, not examples, sorry:

Style FvwmDock	NoTitle, StaysOnBottom, Sticky, WindowListSkip, \
   		CirculateSkipIcon, CirculateSkip, HandleWidth 0, BorderWidth 0
# NeverFocus, Layer 1

KillModule FvwmButtons
DestroyModuleConfig FvwmDock: *
*FvwmDock:      BoxSize         fixed
*FvwmDock:      Colorset        4
*FvwmDock:      Rows            1
*FvwmDock:      Columns         5
*FvwmDock:      Geometry        640x136-5-0
*FvwmDock:      Padding         0 0
*FvwmDock:      Frame           0
*FvwmDock:      (2x1, Swallow "xpad" `Exec exec xpad` )
*FvwmDock:      (2x1, ActionOnPress, \
                Swallow "jcalendar" `Exec exec xterm +sb -sl 0 -name jcalendar -fg white -bg black -e 'echo "e[?25l"; while [ 1 ]; do clear;calendar|head -10; sleep 600; done'`, Action `exec xclock` )
*FvwmDock:      (1x1, Swallow "gdeskcal" `Exec exec gdeskcal --skin=alex`, Action 'exec xclock' )

Whatever I do, even a simple:

*FvwmDock:      (1x1, Action 'exec xclock', Swallow "xbiff" 'Exec xbiff' )

works fine, but clicking the swallowed app does not work. I replaced my config with one from pem, with that (dspsrv.com/~jamesc/torture/h … wm2rc-work) one, with simple examples from other places. I tried versions 2.5.0, 2.5.2, the one from SuSE 9.3, without success. .[edit: clicking on a border or title (if set) works!]
apl

It’s always a good idea, when using “Action” to tell it the mouse button to activate it:

*FvwmDock:      (1x1, Action (Mouse 1) 'Exec exec xclock', Swallow "xbiff" 'Exec exec xbiff' )

– Thomas Adam

Thomas, thanks for suggesting that, I just tried, it does not work.

I even tried:

*FvwmDock:      (1x1, Title="xxx", Action (Mouse 1) 'Exec exec xclock', Swallow "xbiff" 'Exec exec xbiff' ) 

As a result, I can click the “xxx” with Mouse 1 and xclock starts. Nothing happens when I click the app.

apl

It does work – it is working, but I suspect that I am not understanding what it is you want to happen. From looking at the line above, you want xbiff to be swallowed in the same button as xclock? Is that correct? Or is it that you just want xbiff to load when you click on the button with the swallowed instance of xclock?

– Thomas Adam

No.

I know it works for everyone else, it just does not work for me. To stay with that example, I want xbiff swallowed and when I click on that xbiff, xclock should start. The example is fine, the problem is, that when I click xbiff, nothing happens - and this is wrong.

The answer to FAQ 4.2 says:

but this is not true for me. My fvwm acts as if it was 2.4.x.
apl

Right. The examples mentioned so far, work verbatim for me, and I run 2.5.14 (CVS) – so by definition it will work in 2.5.12 onwards. What I suspect is happening, if it doesn’t work for you, is that you might well be running a 2.4 version of the FvwmButtons module. Have you ever had fvwm 2.4.X installed on your machine? (hint: ModulePath setting in your .fvwm2rc file)

Other than that, there’s no other explanation I can offer, as it works just fine.

– Thomas Adam

No. The system is relatively fresh, SuSE 9.3 installs a 2.5.10, I upgraded to 2.5.12

> ps aux | grep FvwmButtons
alex     31791  0.0  0.1   4468  1620 ?        S    12:44   0:00 /usr/local/libexec/fvwm/2.5.12/FvwmButtons 15 4 none 0 8 FvwmDock

> strings  /usr/local/libexec/fvwm/2.5.12/FvwmButtons | grep 2\.5\.
2.5.12

> find /usr -name FvwmButtons
/usr/X11R6/lib/X11/fvwm2/FvwmButtons
/usr/local/src/fvwm-2.5.12/modules/FvwmButtons
/usr/local/src/fvwm-2.5.12/modules/FvwmButtons/FvwmButtons
/usr/local/src/fvwm-2.5.13/modules/FvwmButtons
/usr/local/src/fvwm-2.5.13/modules/FvwmButtons/FvwmButtons
/usr/local/src/fvwm-2.5.2/modules/FvwmButtons
/usr/local/src/fvwm-2.5.2/modules/FvwmButtons/FvwmButtons
/usr/local/libexec/fvwm/2.5.2/FvwmButtons
/usr/local/libexec/fvwm/2.5.12/FvwmButtons

Thanks for your help. Maybe someone else has an idea.
apl

Perhaps I can provide further info:

I added debug messages to FvwmButton.c, to have every case of switch(Event.type) print its name. When clicking once on the swallowed app I get “LeaveNotify” and “EnterNotify”, but never “ButtonPress” which calls “GetButtonAction” later.

When I click on the title of the swallowed app (Action works here), I get:
LeaveNotify, EnterNotify, ButtonPress, ButtonRelease, LeaveNotify, EnterNotify.

Apl

Then I can only assume this: I notice from your previous post that although in your process table, you have the 2.5.12 modules running, there is still a 2.5.10 version installed. I’d start by removing that version entirely. Thanks to your debug output, I realise that what’s actually happening is a symptom from 2.5.10 and earlier. When an application window was swallowed in an FvwmButtons instance, the Action event would only run if the border or title of the button was pressed, and never the window itself. Now, this shouldn’t be happening in 2.5.12 and up – in fact, it doesn’t, but it’s the only thing I can think of that’s happening. It’s consistent with your debug output.

In 2.5.12, if you wanted to revert back to the “old” way, of only allowing an action to occur, then you’d use:

*FvwmDock:      (1x1, Title="xxx", Action (Mouse 1) 'Exec exec xclock', \
ActionIgnoresClientWindow, Swallow "xbiff" 'Exec exec xbiff' )

But in your case, this is not what’s needed.

Hope that makes sense

– Thomas Adam

I completely removed version 2.5.10 and restarted X - no effect. I currently think this is not a problem with fvwm but with X, gcc, SuSE in general or whatever. Something smells rotten here.

apl

Ok, I found the culprit:

If I disable numlock, everything works fine, I can launch the “Action” by clicking on the swallowed app.

If I enable numlock it doesn’t work any more.

How does numlock interact with FvwmButtons??? Can this be fixed?

apl

Heh. See the FAQ #0.1 at the main fvwm.org site. Or indeed, search the forums here about it.

– Thomas Adam

I have

IgnoreModifiers L2

from day 0.

If capslock or numlock are on, clicking swallow apps has no effect, if they are off, it works. I have played with IgnoreModifiers and have even removed the keys with xmodmap -e “clear Lock”. None of those changes anything.

[code]> xmodmap
xmodmap: up to 4 keys per modifier, (keycodes in parentheses):

shift Shift_L (0x32), Shift_R (0x3e)
lock Caps_Lock (0x42)
control Control_L (0x25), Control_R (0x6d)
mod1 Alt_L (0x40), Alt_L (0x7d), Meta_L (0x9c)
mod2 Num_Lock (0x4d)
mod3
mod4 Super_L (0x73), Super_R (0x74), Super_L (0x7f), Hyper_L (0x80)
mod5 Mode_switch (0x5d), ISO_Level3_Shift (0x7c)
[/code]

and

> xmodmap -pke | grep -i lock keycode 66 = Caps_Lock keycode 77 = Num_Lock Pointer_EnableKeys keycode 78 = Scroll_Lock

Hmm.
apl