To: vim-dev@vim.org Subject: Patch 6.1a.020 Fcc: outbox From: Bram Moolenaar MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.1a.020 Problem: GTK: after patch 6.1a.011 resizing with the mouse doesn't always work well for small sizes. (Adrien Beau) Solution: Use another way to avoid the problem with ":set co=77". Files: src/gui_gtk_x11.c *** ../vim61a.019/src/gui_gtk_x11.c Thu Feb 28 15:43:51 2002 --- src/gui_gtk_x11.c Sat Mar 2 11:14:28 2002 *************** *** 2076,2084 **** gui_resize_shell(event->width, event->height); gtk_form_thaw(GTK_FORM(gui.formwin)); - /* because of the freeze the form still needs to get the new size */ - gtk_form_set_size(GTK_FORM(gui.formwin), event->width, event->height); - return TRUE; } --- 2076,2081 ---- *************** *** 2259,2264 **** --- 2256,2271 ---- gui_mch_set_shellsize(int width, int height, int min_width, int min_height, int base_width, int base_height) { + /* Hack: When the form already is at the desired size, the window might + * have been resized with the mouse. Force a resize by setting a + * different size first. */ + if (GTK_FORM(gui.formwin)->width == width + && GTK_FORM(gui.formwin)->height == height) + { + gtk_form_set_size(GTK_FORM(gui.formwin), width + 1, height + 1); + gui_mch_update(); + } + gtk_form_set_size(GTK_FORM(gui.formwin), width, height); /* give GTK+ a chance to put all widget's into place */ *** ../vim61a.019/src/version.c Fri Mar 1 21:21:44 2002 --- src/version.c Sat Mar 2 11:14:36 2002 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 20, /**/ -- From "know your smileys": :-E Has major dental problems /// Bram Moolenaar -- Bram@moolenaar.net -- http://www.moolenaar.net \\\ /// Creator of Vim -- http://vim.sf.net -- ftp://ftp.vim.org/pub/vim \\\ \\\ Project leader for A-A-P -- http://www.a-a-p.org /// \\\ Help me helping AIDS orphans in Uganda - http://iccf-holland.org ///