summaryrefslogtreecommitdiffstats
path: root/source/ap/vim/patches/7.3.279
blob: 6a8814b624faa753b01127ef666f27597df8e5ee (about) (plain) (blame)
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
To: vim_dev@googlegroups.com
Subject: Patch 7.3.279
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.3.279
Problem:    With GTK, when gvim is full-screen and a tab is opened and using a
	    specific monitor configuration the window is too big.
Solution:   Adjust the window size like on MS-Windows. (Yukihiro Nakadaira)
Files:	    src/gui.c, src/gui_gtk_x11.c, src/proto/gui_gtk_x11.pro


*** ../vim-7.3.278/src/gui.c	2011-06-26 04:48:56.000000000 +0200
--- src/gui.c	2011-08-10 17:40:31.000000000 +0200
***************
*** 1407,1413 ****
      if (!gui.shell_created)
  	return;
  
! #ifdef MSWIN
      /* If not setting to a user specified size and maximized, calculate the
       * number of characters that fit in the maximized window. */
      if (!mustset && gui_mch_maximized())
--- 1407,1413 ----
      if (!gui.shell_created)
  	return;
  
! #if defined(MSWIN) || defined(FEAT_GUI_GTK)
      /* If not setting to a user specified size and maximized, calculate the
       * number of characters that fit in the maximized window. */
      if (!mustset && gui_mch_maximized())
*** ../vim-7.3.278/src/gui_gtk_x11.c	2011-06-26 04:48:56.000000000 +0200
--- src/gui_gtk_x11.c	2011-08-10 17:42:19.000000000 +0200
***************
*** 3900,3905 ****
--- 3900,3920 ----
  }
  
  /*
+  * Called when the font changed while the window is maximized.  Compute the
+  * new Rows and Columns.  This is like resizing the window.
+  */
+     void
+ gui_mch_newfont()
+ {
+     int w, h;
+ 
+     gtk_window_get_size(GTK_WINDOW(gui.mainwin), &w, &h);
+     w -= get_menu_tool_width();
+     h -= get_menu_tool_height();
+     gui_resize_shell(w, h);
+ }
+ 
+ /*
   * Set the windows size.
   */
      void
***************
*** 4409,4422 ****
  
      if (gui_mch_maximized())
      {
- 	int w, h;
- 
  	/* Update lines and columns in accordance with the new font, keep the
  	 * window maximized. */
! 	gtk_window_get_size(GTK_WINDOW(gui.mainwin), &w, &h);
! 	w -= get_menu_tool_width();
! 	h -= get_menu_tool_height();
! 	gui_resize_shell(w, h);
      }
      else
      {
--- 4424,4432 ----
  
      if (gui_mch_maximized())
      {
  	/* Update lines and columns in accordance with the new font, keep the
  	 * window maximized. */
! 	gui_mch_newfont();
      }
      else
      {
*** ../vim-7.3.278/src/proto/gui_gtk_x11.pro	2010-08-15 21:57:28.000000000 +0200
--- src/proto/gui_gtk_x11.pro	2011-08-10 17:42:29.000000000 +0200
***************
*** 20,25 ****
--- 20,26 ----
  void gui_mch_set_winpos __ARGS((int x, int y));
  int gui_mch_maximized __ARGS((void));
  void gui_mch_unmaximize __ARGS((void));
+ void gui_mch_newfont __ARGS((void));
  void gui_mch_set_shellsize __ARGS((int width, int height, int min_width, int min_height, int base_width, int base_height, int direction));
  void gui_mch_get_screen_dimensions __ARGS((int *screen_w, int *screen_h));
  void gui_mch_settitle __ARGS((char_u *title, char_u *icon));
*** ../vim-7.3.278/src/version.c	2011-08-10 17:25:48.000000000 +0200
--- src/version.c	2011-08-10 17:43:22.000000000 +0200
***************
*** 711,712 ****
--- 711,714 ----
  {   /* Add new patch number below this line */
+ /**/
+     279,
  /**/

-- 
LAUNCELOT: Isn't there a St. Aaaaarrrrrrggghhh's in Cornwall?
ARTHUR:    No, that's Saint Ives.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///