comparison src/gui_gtk.c @ 2103:89dc68c0ab6f v7.2.386

updated for version 7.2.386 Problem: Focus hack for KDE 3.1 causes problems for other window managers. Solution: Remove the hack. (forwarded by Joel Bradshaw)
author Bram Moolenaar <bram@zimbu.org>
date Wed, 10 Mar 2010 12:25:03 +0100
parents 3dd986bfef63
children e4d849f4df03
comparison
equal deleted inserted replaced
2102:907cf09fbb32 2103:89dc68c0ab6f
2311 CONVERT_FROM_UTF8_FREE(text); 2311 CONVERT_FROM_UTF8_FREE(text);
2312 } 2312 }
2313 gtk_widget_destroy(dialog); 2313 gtk_widget_destroy(dialog);
2314 } 2314 }
2315 2315
2316 /* Terrible hack: When the text area still has focus when we remove the
2317 * dialog, somehow gvim loses window focus. This is with "point to type"
2318 * in the KDE 3.1 window manager. Warp the mouse pointer to outside the
2319 * window and back to avoid that. */
2320 if (!gui.in_focus)
2321 {
2322 int x, y;
2323
2324 gdk_window_get_pointer(gui.drawarea->window, &x, &y, NULL);
2325 gui_mch_setmouse(-100, -100);
2326 gui_mch_setmouse(x, y);
2327 }
2328
2329 return response > 0 ? response : 0; 2316 return response > 0 ? response : 0;
2330 } 2317 }
2331 2318
2332 #endif /* FEAT_GUI_DIALOG && HAVE_GTK2 */ 2319 #endif /* FEAT_GUI_DIALOG && HAVE_GTK2 */
2333 2320