2009/2/14 Stephen Talley <stephen.tal...@sun.com>: > Upon upgrading, I see that SnapGrid is now a style, so I changed this > to: > > Style * SnapGrid 0 0 > > DestroyFunc MoveIcon > AddToFunc MoveIcon > + I Style * SnapGrid $[ICONWIDTH] $[ICONHEIGHT] > + I Move > + I Style * SnapGrid 0 0 > > But this no longer works -- the "SnapGrid 0 0" behavior is always in > effect. It appears the Style commands don't take effect until after > the Move. > > Is there some way to force the Style changes before the Move?
You would need to enforce that via PipeRead to ensure correct synchronisation of commands. Of course, given this already has an operand window at the time it's run, I fail to see why you're making it a global thing. C.f.: DestroyFunc MoveIcon AddToFunc MoveIcon + I WindowStyle SnapGrid $[ICONWIDTH] $[ICONHEIGHT] + I UpdateStyles + I PipeRead `echo Move` + I WindowStyle SnapGrid 0 0 + I UpdateStyles Note the PipeRead which ensures nothing else after it in the function runs until it completes (i.e., PipeRead always blocks events.) I've not tested this, but something similar to the above ought to put you on the right lines. I don't use Icons in my setup. -- Thomas Adam