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.
The patch moves the gvim server from one desktop to another. In my
opinion users have intentionally put applications on a certain desktop
and don't want them being moved elsewhere. It's usually better to
switch to that desktop.
I think you made this to have the command bring the Vim server onto the
screen, so that you can start using it. The foreground() call is
intended to do the same thing. Implementing them differently is
confusing.
If you can make the code make the desktop that contains Vim the current
destktop, then it can be part of foreground(). And then remote-raise
can invoke foreground() to do its work.
--
hundred-and-one symptoms of being an internet addict:
139. You down your lunch in five minutes, at your desk, so you can
spend the rest of the hour surfing the Net.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---