On 21/01/09 18:13, Paul Egan wrote:
> Attached is a patch which adds a "raise" option to the --remote
> arguments. Use of this option requests the window manager to
> raise the remote server window into focus and explicitly
> moves it to the current desktop if required.
>
> My first attempt at this functionality was to use a --remote-send
> ":call foreground()<CR>", however most window managers (or the
> versions patched by Fedora, Ubuntu, etc) will ignore the
> resulting gtk_window_present call - or at least just "pulse" the
> window list item - which isn't very useful.
>
> There's a long running debate about the correct actions that
> should be taken for gtk_window_present and _NET_ACTIVE_WINDOW,
> with each app and wm having a slightly different take. It could
> be argued that the "issue" this patch fixes should really be dealt
> with by the window manager rather than the application. Perhaps
> in the future there might be support for application hinting that
> could allow vim to have foreground()/gtk_window_present work as
> "expected", but in the meantime this patch performs an explicit
> move& raise.
>
> I added the code to if_xcmdsrv.c since it's toolkit independent
> and there's already similar X functions there.
>
> I hope others find this useful.
You don't need to patch the code for that:
vim -c "call remote-foreground('foobar')"
or (from an already-running Vim)
:call remote-foreground('foobar')
where foobar is the server name. See ":help remote-foreground()"
Best regards,
Tony.
--
Playing an unamplified electric guitar is like strumming on a picnic
table.
-- Dave Barry, "The Snake"
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---