From 90e19494e39e0e5015c583e25d2f87f6d9554adc Mon Sep 17 00:00:00 2001
From: Michael Wookey <michaelwookey@gmail.com>
Date: Fri, 16 Oct 2009 18:59:22 +1100
Subject: [PATCH] fix guifont behaviour with Windows multimonitor

When Win32 gvim is on a secondary monitor and the guifont is changed,
the gvim window will reposition to the primary monitor. This is due to
code in gui_set_shellsize() which repositions the gvim window if either
the x or y location of the top left corner of the gvim window is less
than zero.

On Windows with a multimonitor setup, it is normal to have non-primary
monitors with negative window coordinates. This makes the test in
gui_set_shellsize() somewhat invalid and has undesired side effects (on
Windows at least).

This patch prevents the gvim window from jumping to the primary monitor
(if it was on a secondary monitor) when the guifont changes.

Signed-off-by: Michael Wookey <michaelwookey@gmail.com>
---
 src/gui.c |    8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)

diff --git a/src/gui.c b/src/gui.c
index 48e7b0f..e77c273 100644
--- a/src/gui.c
+++ b/src/gui.c
@@ -750,13 +750,7 @@ gui_init_font(font_list, fontset)
 # endif
 	    gui_mch_set_font(gui.norm_font);
 #endif
-	gui_set_shellsize(FALSE,
-#ifdef MSWIN
-		TRUE
-#else
-		FALSE
-#endif
-		, RESIZE_BOTH);
+	gui_set_shellsize(FALSE, FALSE , RESIZE_BOTH);
     }
 
     return ret;
-- 
1.6.5.15.gc274d

