4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: MS-Windows: When the taskbar is at the left or top of the screen,
12 the Vim window placement is wrong.
13 Solution: Compute the size and position of the window correctly. (Taro
15 Files: src/gui_w32.c, src/gui_w48.c
18 *** ../vim-6.2.204/src/gui_w32.c Sun Oct 12 16:42:14 2003
19 --- src/gui_w32.c Tue Jan 13 12:05:08 2004
23 if (win_ypos < workarea_rect.top)
24 win_ypos = workarea_rect.top;
26 + /* When the taskbar is placed on the left or top of the screen,
27 + * SetWindowPlacement() adds its width or height automatically, compensate
28 + * for that. When the offset is over 400 it's probably something else,
29 + * skip it then (just in case). */
30 + if (workarea_rect.left > 0 && workarea_rect.left < 400)
31 + win_xpos -= workarea_rect.left;
32 + if (workarea_rect.top > 0 && workarea_rect.top < 400)
33 + win_ypos -= workarea_rect.top;
35 wndpl.rcNormalPosition.left = win_xpos;
36 wndpl.rcNormalPosition.right = win_xpos + win_width;
37 wndpl.rcNormalPosition.top = win_ypos;
38 *** ../vim-6.2.204/src/gui_w48.c Sun Jan 18 21:01:53 2004
39 --- src/gui_w48.c Wed Jan 21 16:11:49 2004
42 gui_mch_get_screen_dimensions(int *screen_w, int *screen_h)
45 ! *screen_w = GetSystemMetrics(SM_CXSCREEN)
46 - GetSystemMetrics(SM_CXFRAME) * 2;
47 /* FIXME: dirty trick: Because the gui_get_base_height() doesn't include
48 * the menubar for MSwin, we subtract it from the screen height, so that
50 gui_mch_get_screen_dimensions(int *screen_w, int *screen_h)
53 ! *screen_w = GetSystemMetrics(SM_CXFULLSCREEN)
54 - GetSystemMetrics(SM_CXFRAME) * 2;
55 /* FIXME: dirty trick: Because the gui_get_base_height() doesn't include
56 * the menubar for MSwin, we subtract it from the screen height, so that
57 *** ../vim-6.2.204/src/version.c Sun Jan 25 20:21:35 2004
58 --- src/version.c Sun Jan 25 20:22:48 2004
62 { /* Add new patch number below this line */
68 [The rest of the ARMY stand around looking at a loss.]
69 INSPECTOR END OF FILM: (picks up megaphone) All right! Clear off! Go on!
70 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
72 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
73 /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
74 \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
75 \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html ///