1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
To: vim-dev@vim.org
Subject: Patch 7.2.350
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------
Patch 7.2.350
Problem: Win32: When changing font the window may jump from the secondary
to the primary screen. (Michael Wookey)
Solution: When the screen position was negative don't correct it to zero.
Files: src/gui.c
*** ../vim-7.2.349/src/gui.c 2009-09-23 18:14:13.000000000 +0200
--- src/gui.c 2010-01-27 21:02:32.000000000 +0100
***************
*** 1390,1395 ****
--- 1390,1396 ----
int un_maximize = mustset;
int did_adjust = 0;
#endif
+ int x = -1, y = -1;
if (!gui.shell_created)
return;
***************
*** 1406,1411 ****
--- 1407,1416 ----
base_width = gui_get_base_width();
base_height = gui_get_base_height();
+ if (fit_to_display)
+ /* Remember the original window position. */
+ gui_mch_get_winpos(&x, &y);
+
#ifdef USE_SUN_WORKSHOP
if (!mustset && usingSunWorkShop
&& workshop_get_width_height(&width, &height))
***************
*** 1473,1483 ****
gui_mch_set_shellsize(width, height, min_width, min_height,
base_width, base_height, direction);
- if (fit_to_display)
- {
- int x, y;
! /* Some window managers put the Vim window left of/above the screen. */
gui_mch_update();
if (gui_mch_get_winpos(&x, &y) == OK && (x < 0 || y < 0))
gui_mch_set_winpos(x < 0 ? 0 : x, y < 0 ? 0 : y);
--- 1478,1489 ----
gui_mch_set_shellsize(width, height, min_width, min_height,
base_width, base_height, direction);
! if (fit_to_display && x >= 0 && y >= 0)
! {
! /* Some window managers put the Vim window left of/above the screen.
! * Only change the position if it wasn't already negative before
! * (happens on MS-Windows with a secondary monitor). */
gui_mch_update();
if (gui_mch_get_winpos(&x, &y) == OK && (x < 0 || y < 0))
gui_mch_set_winpos(x < 0 ? 0 : x, y < 0 ? 0 : y);
*** ../vim-7.2.349/src/version.c 2010-01-27 20:26:41.000000000 +0100
--- src/version.c 2010-01-27 21:03:41.000000000 +0100
***************
*** 683,684 ****
--- 683,686 ----
{ /* Add new patch number below this line */
+ /**/
+ 350,
/**/
--
hundred-and-one symptoms of being an internet addict:
160. You get in the elevator and double-click the button for the floor
you want.
/// Bram Moolenaar -- Bram@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 ///
|