Here is a fvwm puzzle that I suspect is solvable but I don't know how to solve. When a window is iconified or starts out iconified, I'd like its icon location to go as follows:
1) if it's not being iconified for the first time, its icon goes wherever it did last time (whether I moved it from there or not) 2) if it's being iconified for the first time and it has an icon position hint, the icon goes there. This includes if the program is starting iconified (as a few of my programs do) 3) otherwise, the icon position should be under the mouse, where it will then stay under rule (1); ie if I iconify it, don't move the icon, de-iconify it, and then re-iconify it, it doesn't reposition itself under the current mouse button location. The sticking point in my last attempt was icon position hints. My notes say that I could use FvwmEvent in combination with fvwm's normal features to get everything short of that: # Windows are born in state 1, 'never been iconified' Style * State 1 # A state 1 window that has never been iconified has its icon # automatically moved to the mouse position, then stops being # state 1 so this doesn't happen again next time around. Since # it's been explicitly moved, fvwm will not try to auto-place it # in the future. *FvwmEvent: iconify ZapIconPlacement AddToFunc ZapIconPlacement + I ThisWindow (State 1) Move m+0 m+0 + I ThisWindow (State 1) WindowStyle !State 1 However as far as I can see there isn't any way to exclude windows with icon position hints from this. Is there a clever trick that I'm missing? Alternately, is there a chance that a patch to add a new condition, call it say 'HasIconPositionHint', would be accepted? Thanks in advance. - cks PS: for the curious, I currently deal with this with a crude patch to the fvwm source. however, I would like to reduce the number of personal fvwm changes I keep carrying around and achieve the same ends in an officially approved, low-maintenance way.