To: vim-dev@vim.org Subject: Patch 6.0.263 Fcc: outbox From: Bram Moolenaar MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.0.263 Problem: GTK: When a dialog is closed by the window manager, Vim hangs. (Christian J. Robinson) Solution: Use GTK_WIDGET_DRAWABLE() instead of GTK_WIDGET_VISIBLE(). Files: src/gui_gtk.c, src/gui_gtk_x11.c *** ../vim60.262/src/gui_gtk.c Mon Feb 11 14:04:44 2002 --- src/gui_gtk.c Tue Feb 12 10:51:26 2002 *************** *** 914,920 **** GTK_WIDGET(gui.filedlg), VW_POS_MOUSE); gtk_widget_show(gui.filedlg); ! while (gui.filedlg && GTK_WIDGET_VISIBLE(gui.filedlg)) gtk_main_iteration_do(TRUE); if (gui.browse_fname == NULL) --- 913,919 ---- GTK_WIDGET(gui.filedlg), VW_POS_MOUSE); gtk_widget_show(gui.filedlg); ! while (gui.filedlg && GTK_WIDGET_DRAWABLE(gui.filedlg)) gtk_main_iteration_do(TRUE); if (gui.browse_fname == NULL) *************** *** 1080,1086 **** GTK_WIDGET(dlg), VW_POS_MOUSE); return (1 + gnome_dialog_run_and_close(GNOME_DIALOG(dlg))); ! } /* gui_mch_dialog */ # endif /* FEAT_GUI_GNOME */ --- 1079,1085 ---- GTK_WIDGET(dlg), VW_POS_MOUSE); return (1 + gnome_dialog_run_and_close(GNOME_DIALOG(dlg))); ! } # endif /* FEAT_GUI_GNOME */ *************** *** 1413,1419 **** gtk_widget_show(dialog); /* loop here until the dialog goes away */ ! while (dialog_status == -1 && GTK_WIDGET_VISIBLE(dialog)) gtk_main_iteration_do(TRUE); if (dialog_status < 0) --- 1412,1418 ---- gtk_widget_show(dialog); /* loop here until the dialog goes away */ ! while (dialog_status == -1 && GTK_WIDGET_DRAWABLE(dialog)) gtk_main_iteration_do(TRUE); if (dialog_status < 0) *** ../vim60.262/src/gui_gtk_x11.c Thu Feb 21 21:19:59 2002 --- src/gui_gtk_x11.c Thu Feb 21 21:11:54 2002 *************** *** 2500,2506 **** } /* Wait for the font dialog to be closed. */ ! while (gui.fontdlg && GTK_WIDGET_VISIBLE(gui.fontdlg)) gtk_main_iteration_do(TRUE); if (gui.fontname == NULL) --- 2500,2506 ---- } /* Wait for the font dialog to be closed. */ ! while (gui.fontdlg && GTK_WIDGET_DRAWABLE(gui.fontdlg)) gtk_main_iteration_do(TRUE); if (gui.fontname == NULL) *************** *** 2801,2807 **** GdkColor color; int parsed; ! /* Since we have allready called gtk_set_locale here the bugger * XParseColor will accept only explicit color names in the language * of the current locale. However this will interferre with: * 1. Vim's global startup files --- 2801,2807 ---- GdkColor color; int parsed; ! /* Since we have already called gtk_set_locale here the bugger * XParseColor will accept only explicit color names in the language * of the current locale. However this will interferre with: * 1. Vim's global startup files *************** *** 3007,3014 **** int i; for (i = 0; special_keys[i].key_sym != 0; i++) ! if (name[0] == special_keys[i].code0 && ! name[1] == special_keys[i].code1) return OK; return FAIL; } --- 3007,3014 ---- int i; for (i = 0; special_keys[i].key_sym != 0; i++) ! if (name[0] == special_keys[i].code0 ! && name[1] == special_keys[i].code1) return OK; return FAIL; } *************** *** 3527,3532 **** --- 3527,3533 ---- /* * Disown the selection. */ + /*ARGSUSED*/ void clip_mch_lose_selection(cbd) VimClipboard *cbd; *************** *** 3560,3565 **** --- 3561,3567 ---- * Send the current selection to the clipboard. Do nothing for X because we * will fill in the selection only when requested by another app. */ + /*ARGSUSED*/ void clip_mch_set_selection(cbd) VimClipboard* cbd; *** ../vim60.262/src/version.c Fri Feb 22 17:03:56 2002 --- src/version.c Fri Feb 22 19:45:43 2002 *************** *** 608,609 **** --- 608,611 ---- { /* Add new patch number below this line */ + /**/ + 263, /**/ -- hundred-and-one symptoms of being an internet addict: 1. You actually wore a blue ribbon to protest the Communications Decency Act. /// 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 ///