Without commenting on all particular statement in this discussion, I want to make clear why I think it's a bad idea to leave the decision about grab/nograb to the user:
1) The user has *no* idea of the implications and can not make a proper decision. Hell, even something as simple as this may freeze fvwm: AddToFunc foobar I CursorMove 10p 10p How are we going to explain that to the user? The usability of that feature would be horrible: either we explain it in length. Then nobody would be able to use it. Or we don't explain it at all and everybody writes unsafe functions. 2) It would be a maintenance nightmare. When something strange happens, there is always the possibility of some random interaction that we would never pin down. In my eyes, such a feature is *unmaintainable*. -- On Wed, Jun 28, 2006 at 11:39:13PM +0000, Mikhael Goikhman wrote: > On 29 Jun 2006 00:44:22 +0200, Dominik Vogt wrote: > > We would have to exclude at least: > > > > * Anything that can generate dynamic functions because it is > > impossible to decide about whether a grab is needed (Read, > > PipeRead, expanding variables or environment variables). > > We are speaking about a user who knows what these Read and PipeRead > commands do. I am not sure why you insist on automatic detection only. See my reasoning above. The user most certainly does *not* know what he is doing. > > * Commands calling or manipulating functions (AddToFunc, > > DestroyFunc, calling a sub-function). > > Again, these may be pretty safe, a user should be able to specify NoGrab > flag here. No, because calling and modifying sub-functions can change whether a function is a valid "nograb" function or not. > > * Any other command that may grab the pointer itself (e.g. Exec). > > The same with Exec (a user knows better). Um, I meant Wait, not Exec. -- > I don't think a possible problem with NoGrab are that critical. If a user > wants to get some nograb-related failures, he should be able to do so. > There is no good reason the user has no relable way to do this currently: > > DefineFunc UpdateTitlePeriodically NoGrab > + I PipeRead `printf "SetEnv DATE "; date +%Y-%m-%d` > + I SendToModule FvwmButtons-Panel ChangeButton ... $[DATE] > + I Schedule 20000 UpdateTitlePeriodically Wait a minute, the "nograb" stuff does *not* solve this problem. It is still possible that a command in a nograb function needs to grab the pointer. It it does not get it, the function is terminated and the command is not rescheduled either (e.g. the Wait command). -- > Well, years ago I suggested to make "I" specifier optional in functions, > because 90% of functions are immediate and there is no confusion if "I" > is omitted. But there is abiguity. Fvwm would now be able to distinguish between + Iconify off and + I off as well as + I foobar + I I foobar > But there was no agreement. I would say that AllImmediate > flag is redundant (may be a default). This may be discussed after 2.6.0. -- @Scott: I was suggesting a whitelist, not a blacklist. I.e. if in doubt, forbid it. Ciao Dominik ^_^ ^_^ -- Dominik Vogt, [EMAIL PROTECTED]
signature.asc
Description: Digital signature