home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 6.2.205 < prev    next >
Encoding:
Internet Message Format  |  2004-01-24  |  2.8 KB

  1. To: vim-dev@vim.org
  2. Subject: Patch 6.2.205
  3. Fcc: outbox
  4. From: Bram Moolenaar <Bram@moolenaar.net>
  5. Mime-Version: 1.0
  6. Content-Type: text/plain; charset=ISO-8859-1
  7. Content-Transfer-Encoding: 8bit
  8. ------------
  9.  
  10. Patch 6.2.205 (extra)
  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
  14.         Muraoka)
  15. Files:        src/gui_w32.c, src/gui_w48.c
  16.  
  17.  
  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
  20. ***************
  21. *** 1197,1202 ****
  22. --- 1197,1211 ----
  23.       if (win_ypos < workarea_rect.top)
  24.       win_ypos = workarea_rect.top;
  25.   
  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;
  34.       wndpl.rcNormalPosition.left = win_xpos;
  35.       wndpl.rcNormalPosition.right = win_xpos + win_width;
  36.       wndpl.rcNormalPosition.top = win_ypos;
  37. *** ../vim-6.2.204/src/gui_w48.c    Sun Jan 18 21:01:53 2004
  38. --- src/gui_w48.c    Wed Jan 21 16:11:49 2004
  39. ***************
  40. *** 2348,2354 ****
  41.   gui_mch_get_screen_dimensions(int *screen_w, int *screen_h)
  42.   {
  43.   
  44. !     *screen_w = GetSystemMetrics(SM_CXSCREEN)
  45.             - GetSystemMetrics(SM_CXFRAME) * 2;
  46.       /* FIXME: dirty trick: Because the gui_get_base_height() doesn't include
  47.        * the menubar for MSwin, we subtract it from the screen height, so that
  48. --- 2348,2354 ----
  49.   gui_mch_get_screen_dimensions(int *screen_w, int *screen_h)
  50.   {
  51.   
  52. !     *screen_w = GetSystemMetrics(SM_CXFULLSCREEN)
  53.             - GetSystemMetrics(SM_CXFRAME) * 2;
  54.       /* FIXME: dirty trick: Because the gui_get_base_height() doesn't include
  55.        * the menubar for MSwin, we subtract it from the screen height, so that
  56. *** ../vim-6.2.204/src/version.c    Sun Jan 25 20:21:35 2004
  57. --- src/version.c    Sun Jan 25 20:22:48 2004
  58. ***************
  59. *** 639,640 ****
  60. --- 639,642 ----
  61.   {   /* Add new patch number below this line */
  62. + /**/
  63. +     205,
  64.   /**/
  65.  
  66. -- 
  67.    [The rest of the ARMY stand around looking at a loss.]
  68. INSPECTOR END OF FILM: (picks up megaphone) All right!  Clear off!  Go on!
  69.                  "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
  70.  
  71.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  72. ///        Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  73. \\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
  74.  \\\  Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html  ///
  75.