Hi Mikhael, > > DefineFunc would behave much like AddToFunc except for 3 differences: > > 1. It would generate a warning message if the function already existed. > > This is bad. Configs should usually be re-read-able. Instead, it should > silently apply DestroyFunc. In fact, DefineFunc (combining DestroyFunc > and AddToFunc) is something I wanted to have for a long time.
Good idea. > It is ok by me to add DefineFunc before 2.6.0, if it fixes issues. > Particularly, will it fix reliability of (re-)Schedule? In my opinion, it's not Schedule that is broken/unreliable. _Any_ function may fail to execute if the pointer is grabbed for ~1 second at the time of execution. With the proposed modifications, "NoGrab" functions will not be prone, to this failure. ie. if Schedule invokes a "NoGrab" function, it will execute - even if the pointer is grabbed by some other app. This patch is available at: http://members.optusnet.com.au/scottsmedley/fvwm/defineFunc.patch Apply with: patch -p0 < defineFunc.patch A question about the implementation: Given this function DefineFunc MyFunc NoGrab + I Echo hello world + C Echo click should FVWM generate a warning (or error?) about using a non-I (immediate) condition within a NoGrab function? Perhaps reverting the function to a normal "Grab" function? Also, I took the liberty of adding an "AllImmediate" function option which allows the condition to be omitted. For example: DefineFunc MyFunc NoGrab AllImmediate + Echo hello + Echo world which I find much more intuitive. The "AllImmediate" flag indicates that all actions are "I" - immediately executed. How do others feel about this option? If there are objections I will happily remove it. SCoTT. :)