diff options
author | Bram Moolenaar <Bram@vim.org> | 2007-09-05 19:47:23 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2007-09-05 19:47:23 +0000 |
commit | 9c8791fde0dc9f8821db48a7ccf373fe90d506d9 (patch) | |
tree | 1a109da6e3f4caa4fb16c0d9ba18610842a4f09d /src/gui_gtk_x11.c | |
parent | 102e3a6164717521e3718b7afcd72820e8bae1fc (diff) | |
download | vim-9c8791fde0dc9f8821db48a7ccf373fe90d506d9.zip |
updated for version 7.1-095
Diffstat (limited to 'src/gui_gtk_x11.c')
-rw-r--r-- | src/gui_gtk_x11.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c index 541240de9..c5b112856 100644 --- a/src/gui_gtk_x11.c +++ b/src/gui_gtk_x11.c @@ -813,10 +813,15 @@ focus_in_event(GtkWidget *widget, GdkEventFocus *event, gpointer data) if (blink_state == BLINK_NONE) gui_mch_start_blink(); - /* make sure keyboard input goes to the draw area (if this is focus for a window) */ + /* make sure keyboard input goes to the draw area (if this is focus for a + * window) */ if (widget != gui.drawarea) gtk_widget_grab_focus(gui.drawarea); + /* make sure the input buffer is read */ + if (gtk_main_level() > 0) + gtk_main_quit(); + return TRUE; } @@ -829,6 +834,10 @@ focus_out_event(GtkWidget *widget, GdkEventFocus *event, gpointer data) if (blink_state != BLINK_NONE) gui_mch_stop_blink(); + /* make sure the input buffer is read */ + if (gtk_main_level() > 0) + gtk_main_quit(); + return TRUE; } |