Karsten Hopp cd19a1
To: vim-dev@vim.org
Karsten Hopp cd19a1
Subject: Patch 7.1.141
Karsten Hopp cd19a1
Fcc: outbox
Karsten Hopp cd19a1
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp cd19a1
Mime-Version: 1.0
Karsten Hopp cd19a1
Content-Type: text/plain; charset=ISO-8859-1
Karsten Hopp cd19a1
Content-Transfer-Encoding: 8bit
Karsten Hopp cd19a1
------------
Karsten Hopp cd19a1
Karsten Hopp cd19a1
Patch 7.1.141
Karsten Hopp cd19a1
Problem:    GTK: -geom argument doesn't support a negative offset.
Karsten Hopp cd19a1
Solution:   Compute position from the right/lower corner.
Karsten Hopp cd19a1
Files:	    src/gui_gtk_x11.c
Karsten Hopp cd19a1
Karsten Hopp cd19a1
Karsten Hopp cd19a1
*** ../vim-7.1.140/src/gui_gtk_x11.c	Sat Sep 15 14:06:41 2007
Karsten Hopp cd19a1
--- src/gui_gtk_x11.c	Mon Oct  8 21:26:50 2007
Karsten Hopp cd19a1
***************
Karsten Hopp cd19a1
*** 4044,4049 ****
Karsten Hopp cd19a1
--- 4044,4051 ----
Karsten Hopp cd19a1
  	unsigned int	w, h;
Karsten Hopp cd19a1
  	int		x = 0;
Karsten Hopp cd19a1
  	int		y = 0;
Karsten Hopp cd19a1
+ 	guint		pixel_width;
Karsten Hopp cd19a1
+ 	guint		pixel_height;
Karsten Hopp cd19a1
  
Karsten Hopp cd19a1
  	mask = XParseGeometry((char *)gui.geom, &x, &y, &w, &h);
Karsten Hopp cd19a1
  
Karsten Hopp cd19a1
***************
Karsten Hopp cd19a1
*** 4055,4066 ****
Karsten Hopp cd19a1
--- 4057,4087 ----
Karsten Hopp cd19a1
  		p_window = h - 1;
Karsten Hopp cd19a1
  	    Rows = h;
Karsten Hopp cd19a1
  	}
Karsten Hopp cd19a1
+ 
Karsten Hopp cd19a1
+ 	pixel_width = (guint)(gui_get_base_width() + Columns * gui.char_width);
Karsten Hopp cd19a1
+ 	pixel_height = (guint)(gui_get_base_height() + Rows * gui.char_height);
Karsten Hopp cd19a1
+ 
Karsten Hopp cd19a1
+ #ifdef HAVE_GTK2
Karsten Hopp cd19a1
+ 	pixel_width  += get_menu_tool_width();
Karsten Hopp cd19a1
+ 	pixel_height += get_menu_tool_height();
Karsten Hopp cd19a1
+ #endif
Karsten Hopp cd19a1
+ 
Karsten Hopp cd19a1
  	if (mask & (XValue | YValue))
Karsten Hopp cd19a1
+ 	{
Karsten Hopp cd19a1
+ 	    int w, h;
Karsten Hopp cd19a1
+ 	    gui_mch_get_screen_dimensions(&w, &h);
Karsten Hopp cd19a1
+ 	    h += p_ghr + get_menu_tool_height();
Karsten Hopp cd19a1
+ 	    w += get_menu_tool_width();
Karsten Hopp cd19a1
+ 	    if (mask & XNegative)
Karsten Hopp cd19a1
+ 		x += w - pixel_width;
Karsten Hopp cd19a1
+ 	    if (mask & YNegative)
Karsten Hopp cd19a1
+ 		y += h - pixel_height;
Karsten Hopp cd19a1
  #ifdef HAVE_GTK2
Karsten Hopp cd19a1
  	    gtk_window_move(GTK_WINDOW(gui.mainwin), x, y);
Karsten Hopp cd19a1
  #else
Karsten Hopp cd19a1
  	    gtk_widget_set_uposition(gui.mainwin, x, y);
Karsten Hopp cd19a1
  #endif
Karsten Hopp cd19a1
+ 	}
Karsten Hopp cd19a1
  	vim_free(gui.geom);
Karsten Hopp cd19a1
  	gui.geom = NULL;
Karsten Hopp cd19a1
  
Karsten Hopp cd19a1
***************
Karsten Hopp cd19a1
*** 4071,4084 ****
Karsten Hopp cd19a1
  	 */
Karsten Hopp cd19a1
  	if (gtk_socket_id != 0  &&  (mask & WidthValue || mask & HeightValue))
Karsten Hopp cd19a1
  	{
Karsten Hopp cd19a1
- 	    guint pixel_width = (guint)(gui_get_base_width() + Columns * gui.char_width);
Karsten Hopp cd19a1
- 	    guint pixel_height = (guint)(gui_get_base_height() + Rows * gui.char_height);
Karsten Hopp cd19a1
- 
Karsten Hopp cd19a1
- #ifdef HAVE_GTK2
Karsten Hopp cd19a1
- 	    pixel_width  += get_menu_tool_width();
Karsten Hopp cd19a1
- 	    pixel_height += get_menu_tool_height();
Karsten Hopp cd19a1
- #endif
Karsten Hopp cd19a1
- 
Karsten Hopp cd19a1
  	    update_window_manager_hints(pixel_width, pixel_height);
Karsten Hopp cd19a1
  	    init_window_hints_state = 1;
Karsten Hopp cd19a1
  	    g_timeout_add(1000, check_startup_plug_hints, NULL);
Karsten Hopp cd19a1
--- 4092,4097 ----
Karsten Hopp cd19a1
*** ../vim-7.1.140/src/version.c	Sun Oct 14 17:15:45 2007
Karsten Hopp cd19a1
--- src/version.c	Fri Oct 19 14:28:52 2007
Karsten Hopp cd19a1
***************
Karsten Hopp cd19a1
*** 668,669 ****
Karsten Hopp cd19a1
--- 668,671 ----
Karsten Hopp cd19a1
  {   /* Add new patch number below this line */
Karsten Hopp cd19a1
+ /**/
Karsten Hopp cd19a1
+     141,
Karsten Hopp cd19a1
  /**/
Karsten Hopp cd19a1
Karsten Hopp cd19a1
-- 
Karsten Hopp cd19a1
hundred-and-one symptoms of being an internet addict:
Karsten Hopp cd19a1
35. Your husband tells you he's had the beard for 2 months.
Karsten Hopp cd19a1
Karsten Hopp cd19a1
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp cd19a1
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp cd19a1
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp cd19a1
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///