lkundrak / rpms / vim

Forked from rpms/vim 4 years ago
Clone
2102f06
To: vim-dev@vim.org
2102f06
Subject: Patch 7.2.263
2102f06
Fcc: outbox
2102f06
From: Bram Moolenaar <Bram@moolenaar.net>
2102f06
Mime-Version: 1.0
2102f06
Content-Type: text/plain; charset=UTF-8
2102f06
Content-Transfer-Encoding: 8bit
2102f06
------------
2102f06
2102f06
Patch 7.2.263
2102f06
Problem:    GTK2: when using the -geom argument with an offset from the right
2102f06
	    edge and the size is smaller than the default, the Vim window is
2102f06
	    not positioned properly.
2102f06
Solution:   Use another function to set the size. (Vitaly Minko)
2102f06
Files:	    src/gui_gtk_x11.c
2102f06
2102f06
2102f06
*** ../vim-7.2.262/src/gui_gtk_x11.c	2009-09-11 15:46:20.000000000 +0200
2102f06
--- src/gui_gtk_x11.c	2009-09-23 15:43:52.000000000 +0200
2102f06
***************
2102f06
*** 4066,4071 ****
2102f06
--- 4066,4073 ----
2102f06
  {
2102f06
      guicolor_T fg_pixel = INVALCOLOR;
2102f06
      guicolor_T bg_pixel = INVALCOLOR;
2102f06
+     guint		pixel_width;
2102f06
+     guint		pixel_height;
2102f06
  
2102f06
  #ifdef HAVE_GTK2
2102f06
      /*
2102f06
***************
2102f06
*** 4106,4113 ****
2102f06
  	unsigned int	w, h;
2102f06
  	int		x = 0;
2102f06
  	int		y = 0;
2102f06
- 	guint		pixel_width;
2102f06
- 	guint		pixel_height;
2102f06
  
2102f06
  	mask = XParseGeometry((char *)gui.geom, &x, &y, &w, &h);
2102f06
  
2102f06
--- 4108,4113 ----
2102f06
***************
2102f06
*** 4160,4168 ****
2102f06
  	}
2102f06
      }
2102f06
  
2102f06
!     gtk_form_set_size(GTK_FORM(gui.formwin),
2102f06
! 	    (guint)(gui_get_base_width() + Columns * gui.char_width),
2102f06
! 	    (guint)(gui_get_base_height() + Rows * gui.char_height));
2102f06
      update_window_manager_hints(0, 0);
2102f06
  
2102f06
      if (foreground_argument != NULL)
2102f06
--- 4160,4175 ----
2102f06
  	}
2102f06
      }
2102f06
  
2102f06
!     pixel_width = (guint)(gui_get_base_width() + Columns * gui.char_width);
2102f06
!     pixel_height = (guint)(gui_get_base_height() + Rows * gui.char_height);
2102f06
! #ifdef HAVE_GTK2
2102f06
!     /* For GTK2 changing the size of the form widget doesn't cause window
2102f06
!      * resizing. */
2102f06
!     if (gtk_socket_id == 0) 
2102f06
! 	gtk_window_resize(GTK_WINDOW(gui.mainwin), pixel_width, pixel_height);
2102f06
! #else
2102f06
!     gtk_form_set_size(GTK_FORM(gui.formwin), pixel_width, pixel_height);
2102f06
! #endif
2102f06
      update_window_manager_hints(0, 0);
2102f06
  
2102f06
      if (foreground_argument != NULL)
2102f06
*** ../vim-7.2.262/src/version.c	2009-09-18 17:24:54.000000000 +0200
2102f06
--- src/version.c	2009-09-23 17:34:08.000000000 +0200
2102f06
***************
2102f06
*** 678,679 ****
2102f06
--- 678,681 ----
2102f06
  {   /* Add new patch number below this line */
2102f06
+ /**/
2102f06
+     263,
2102f06
  /**/
2102f06
2102f06
-- 
2102f06
hundred-and-one symptoms of being an internet addict:
2102f06
267. You get an extra phone line so you can get phone calls.
2102f06
2102f06
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
2102f06
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
2102f06
\\\        download, build and distribute -- http://www.A-A-P.org        ///
2102f06
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///