Scott Smedley a écrit :
Hi Dominik et al,
This post follows on from the previous "ModuleListenOnly command"
which was getting a bit off-topic.
As a hack/compromise, maybe we could modify AddToFunc to keep track
of whether or not it uses a "mouse modifier" & only then grab the
X server, in execute_complex_function().
We discussed this a couple of years ago, and Olivier(?) suggested
to allow functions without grabbing. The problem is that it is
generally unpredictable which functions need to grab and which do
not, and you can't do it on the fly because its too late then.
I see.
Well, there is at least "3 cases" and not only 2 (grab / nograb).
- Try to grab hard (for a "long" period of time) and give up if the grab
fail. Current fvwm behavior, one problem (beside non execution) is that
fvwm can be locked for a non negligible period of time.
- Executing the function without trying to grab at all. You suggest to
add such possibility.
- Try to grab just 2 times (this is really fast). If the grab succeed
everything is ok. If it fails execute the function any way. This is
maybe a bit stronger/better than the previous case. My fvwm do that for
any totally immediate function. This is not a perfect solution (but
never cause me problems). But at the time we get our first discussion on
this topic there was no consensus about how this should be expressed in
term of fvwm configuration (or not at all).
Of course you may want to have a 4th possibility: "grab fast" and do not
execute if it fails.
Olivier