comparison src/gui_gtk_x11.c @ 1966:43a60ac87145 v7.2.263

updated for version 7.2-263
author vimboss
date Wed, 23 Sep 2009 15:35:48 +0000
parents 26876d0f15e9
children 4f3857aa1785
comparison
equal deleted inserted replaced
1965:8d1db3e3ac5f 1966:43a60ac87145
4064 int 4064 int
4065 gui_mch_open(void) 4065 gui_mch_open(void)
4066 { 4066 {
4067 guicolor_T fg_pixel = INVALCOLOR; 4067 guicolor_T fg_pixel = INVALCOLOR;
4068 guicolor_T bg_pixel = INVALCOLOR; 4068 guicolor_T bg_pixel = INVALCOLOR;
4069 guint pixel_width;
4070 guint pixel_height;
4069 4071
4070 #ifdef HAVE_GTK2 4072 #ifdef HAVE_GTK2
4071 /* 4073 /*
4072 * Allow setting a window role on the command line, or invent one 4074 * Allow setting a window role on the command line, or invent one
4073 * if none was specified. This is mainly useful for GNOME session 4075 * if none was specified. This is mainly useful for GNOME session
4104 { 4106 {
4105 int mask; 4107 int mask;
4106 unsigned int w, h; 4108 unsigned int w, h;
4107 int x = 0; 4109 int x = 0;
4108 int y = 0; 4110 int y = 0;
4109 guint pixel_width;
4110 guint pixel_height;
4111 4111
4112 mask = XParseGeometry((char *)gui.geom, &x, &y, &w, &h); 4112 mask = XParseGeometry((char *)gui.geom, &x, &y, &w, &h);
4113 4113
4114 if (mask & WidthValue) 4114 if (mask & WidthValue)
4115 Columns = w; 4115 Columns = w;
4158 init_window_hints_state = 1; 4158 init_window_hints_state = 1;
4159 g_timeout_add(1000, check_startup_plug_hints, NULL); 4159 g_timeout_add(1000, check_startup_plug_hints, NULL);
4160 } 4160 }
4161 } 4161 }
4162 4162
4163 gtk_form_set_size(GTK_FORM(gui.formwin), 4163 pixel_width = (guint)(gui_get_base_width() + Columns * gui.char_width);
4164 (guint)(gui_get_base_width() + Columns * gui.char_width), 4164 pixel_height = (guint)(gui_get_base_height() + Rows * gui.char_height);
4165 (guint)(gui_get_base_height() + Rows * gui.char_height)); 4165 #ifdef HAVE_GTK2
4166 /* For GTK2 changing the size of the form widget doesn't cause window
4167 * resizing. */
4168 if (gtk_socket_id == 0)
4169 gtk_window_resize(GTK_WINDOW(gui.mainwin), pixel_width, pixel_height);
4170 #else
4171 gtk_form_set_size(GTK_FORM(gui.formwin), pixel_width, pixel_height);
4172 #endif
4166 update_window_manager_hints(0, 0); 4173 update_window_manager_hints(0, 0);
4167 4174
4168 if (foreground_argument != NULL) 4175 if (foreground_argument != NULL)
4169 fg_pixel = gui_get_color((char_u *)foreground_argument); 4176 fg_pixel = gui_get_color((char_u *)foreground_argument);
4170 if (fg_pixel == INVALCOLOR) 4177 if (fg_pixel == INVALCOLOR)