I am currently using a somewhat hacked version of fvwm 2.4.20 and I
would like to move to fvwm 2.5.x (for whatever x is current when I get
all of the pieces working). One of the stumbling blocks is duplicating
one piece of icon placement behavior in my current setup.
I do not have an icon box ('Style * IconBox none'). How I want icon
placement to work is this:
- when a window is iconified for the first time (and does not have any
sort of icon placement specified), the icon is put right under the
mouse cursor.
- when a window is iconified after that, the icon reappears wherever
it was last.
I can see how to use a user function to handle the first-time icon
placement (I think; just use a function that does Iconify + Move to
$[pointer.x] $[pointer.y]), but the bit I'm stuck on is how to get icons
to stay where they are after that. Is there a conditional or a command
that would apply for this?
(It looks like $[i.x] et al are only defined if the window is iconified,
so one can't abuse them to determine whether the icon has already been
positioned somewhere before the Iconify happens.)
Alternately, is there a good place to crowbar this into the source
code as an unsupported private hack (as I wound up doing this to my
copy of 2.4.20)? Looking at the source suggests possibly modifying the
code around the call to get_icon_corner() in icon.c's AutoPlaceIcon()
function to take the initial position from the mouse position instead.
The other option is that I could add a new conditional that tests on
IS_ICON_MOVED() et al; would people find such a patch generally useful
and interesting for the main line code?
Thanks in advance.
- cks