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 received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---
vim-remote-raise.patch
Description: Binary data
