Michael Wookey wrote:

> [cross posting from vim_use to vim_dev...sorry]
> 
> On 17 August 2010 10:05, Michael Wookey <michaelwoo...@gmail.com> wrote:
> > On 17 August 2010 09:08, George V. Reilly <geo...@reilly.org> wrote:
> >> On Mon, Aug 16, 2010 at 3:18 PM, Eric Tetz <erict...@gmail.com> wrote:
> >>>
> >>> I'm trying to use Vim in a dual monitor setup under Windows 7.
> >>> If I put Vim on my secondary monitor, it snaps back to my primary monitor
> >>> every time I change buffers.
> >>> Anybody else experience this, and is there a way to fix it?
> >>
> >> GVim works fine on a 3-monitor Windows 7 setup for me, on any of the
> >> monitors.
> >> Does it repro if you run with "-u NONE"? If not, then it's one of your
> >> plugins.
> >
> > I can reproduce this with "-u NONE". It depends on the monitor layout.
> > I have my primary monitor on the right and the secondary monitor on
> > the left. With gvim started on the primary (right) monitor I'll drag
> > it to the secondary (left) monitor. Then issue a :vsplit. gvim will
> > jump to the primary (right) monitor. The same can be seen when
> > changing the guifont (set gfn=*).
> >
> > The bug is due to the negative coordinates of the secondary monitor. A
> > good place to start debugging would be from gui_set_shellsize().
> 
> The attached patch fixes the immediate problem however it likely
> introduces other bugs. The problem is that gui_set_shellsize() calls
> gui_w32.c:gui_mch_set_shellsize() which clamps horizontal and vertical
> coordinates that are less than zero, to zero. The attached patch just
> removes the "less than zero" test.
> 
> Consider the patch more of an RFC. Maybe someone can think of a better
> solution.

Is there a function to ask the system what the valid coordinates are?
Simply removing these lines will mean that resizing may result in the
gvim window being outside of the screen boundaries on a single monitor.

-- 
% cat /usr/include/life.h
void life(void);

 /// Bram Moolenaar -- b...@moolenaar.net -- 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_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Reply via email to