I would have thought that "foreground" begins the window to the front
of the Z-order where it can be interacted with directly, not that it
is merely restored to 'normal' size.
Not in Vim, but since you mention GTK the command-line program "wmctrl"
might offer a workaround? I'm using it in a shell script that
wraps /usr/bin/gvim to open files from the command-line and in the GUI
within a single Gvim instance. The following command raises an existing
Vim window whether it's on the current desktop or a different one, and
whether the window was minimized or not:
wmctrl -xa gvim.Gvim
Because of the -x it matches the window to raise by it's window class,
which means any single Vim window could be raised by the command. In
your case that probably wouldn't be very useful, because you intended
to use remote_foreground(). However wmctrl can also match windows by
their id and title string.
Hope this helps.
- Peter Odding
Thanks, that is a help. I'm using KDE though, so maybe some DCOP
incantation or similar would be what I need?
Best ,
Ron
wmctrl is window manager agnostic - its basic features should work in
just about every window manager. So, while you might be able to do
some dcop magic instead, there's no reason you couldn't use wmctrl.
~Matt