Re: FVWM: FvwmButtons: Action(mouse 1)

From: Albrecht Kadlec <albrecht_at_auto.tuwien.ac.at>
Date: Mon, 13 May 96 19:50:35 +0200

>>>>> Jens-U H Petersen writes:

J> (Thanks for the new Buttons, Jarl! It's great.)
I can't just add anything to that. (needed some time to find out HOW
powerful it is)


J> Does anyone have a working example of a (mouse) action binding in
J> a swallowed button: I have the following in ".fvwm2rc"

J> ---- Start of included text -----------------------8<--- cut here -------------
J> *FvwmButtons(Swallow(UseOld) "xload1" "Exec xload -font 6x10
J> -background PeachPuff2 -title xload1 -hl yellow -update 5 -scale
J> 2 -geometry -1500-1500 &", Action 'Exec "top_at_clove" xterm -title
J> top_at_clove -e top')
J> ---- End of included text -------------------------8<--- and here -------------
As I see it, your problem is, that once an application is swallowed,
X events are handed to it unfiltered (since it could depend on them -
imagine a swallowed pager, which can't receive any mouse event)

The only example I saw, where an action AND a swallow command was
specified, was Jarls example in the man page.
But that's a swallow with a NOP. (capture existing window, or wait
till a window with that name appears.)
So if no window of that name exists/appears, the "button" is a real
button, which executes the associated action.
If the action starts a window with the long-awaited name, the button
gets REPLACED by the swallowed application, so no more invocations of
the application are possible.

So I don't think it is possible, what you want to do, unless someone
modifies FvwmButtons to intercept events for swallowed applications.

That the return does trigger the action... hmm.
Might be that this is because xload sets the Mwmhints input to false
("I never ever want the keyboard focus." - note: I'm not an X programmer,
I've just been following the discussion here for a long time.)


I just checked:
        I can reproduce the xload behaviour.
        The action doesn't work, if put on a swallowed perfmeter.
                (this does react to keystrokes.)
        xbiff also refuses keystrokes, and the action works.

Seem like I guessed right with the motif input hint.

Is there any similar hint for mouse input? (some sort of SkipFocus flag?)
Can we simulate that, or can we just filter the Event stream to the
application without any hint.

J> But the only way that I can run "top" is by pressing the return
J> key on the button (clicking with the mouse does nothing).

J> If instead I put

J> ---- Start of included text -----------------------8<--- cut here -------------
J> *FvwmButtons(Swallow(UseOld) "xload1" "Exec xload -font 6x10
J> -background PeachPuff2 -title xload1 -hl yellow -update 5 -scale
J> 2 -geometry -1500-1500 &", Action(Mouse 1) 'Exec "top_at_clove"
J> xterm -title top_at_clove -e top')
J> ---- End of included text -------------------------8<--- and here -------------

J> Again nothing happens with mouse clicks, but FvwmButtons crashes
J> with some X error when return is pressed.

I got this one:

X Error (intercepted): BadDrawable (invalid Pixmap or Window parameter)
Major Request Code : 62
Minor Request Code : 0
Resource ID (XID) : 31457301
Error Serial Number : 706

Don't know why the generic mouse action does work, and the mouse n doesn't.

J> Also I don't understand why the examples of UseOld in the manual
J> all combine it with NoKill, when "NoKill" is the default anyway,
J> isn't it? Even with UseOld, is I restart fvwm2 a couple of
J> times, it seems to miss xload's, swisswatch regularly :-(

I think Jarl meant NoClose to be used in conjunction with UseOld, in order
to swallow old apps/unswallow them on exit.

But this only works, when I do a "killmodule FvwmButtons" from FvwmTalk.
If I restart Fvwm2, new xbiff/xclock/console/perfmeter are created, while
the old processes are still alive, though they're NOT mapped anywhere.

(And I deleted the -geometry -1500-1500 as well as I set WindowListHit,
ShowMapping, Icon and Title styles.)


hope this triggers some more thoughts.
albrecht

PS: It's rather quiet on the list: just 14 messages since Friday.
    Or is sth. rotten down here ?
-- 
You can't brush me under the carpet, you can't hide me under the stairs.
The custodian of your private fears, your leading actor of yesteryear,
								-- Marillion
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Mon May 13 1996 - 12:51:24 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:58 BST