aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChong Yidong2010-01-16 15:20:32 -0500
committerChong Yidong2010-01-16 15:20:32 -0500
commit617364feb7163852e7c86323983d58d645063760 (patch)
tree0d2a80bbf76b57442f905b6cee52dc45444196b3 /src
parent82b52e0dfdb69d993f39237fc14345e10356a32b (diff)
downloademacs-617364feb7163852e7c86323983d58d645063760.tar.gz
emacs-617364feb7163852e7c86323983d58d645063760.zip
* xterm.c (event_handler_gdk): Block input (Bug#5037).
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/xterm.c21
2 files changed, 17 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index c18cd27fa0a..e1d2ba440ab 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
12010-01-16 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * xterm.c (event_handler_gdk): Block input (Bug#5037).
4
12010-01-16 Chong Yidong <cyd@stupidchicken.com> 52010-01-16 Chong Yidong <cyd@stupidchicken.com>
2 6
3 * emacs.c (standard_args): Adjust arg priorities to reflect how 7 * emacs.c (standard_args): Adjust arg priorities to reflect how
diff --git a/src/xterm.c b/src/xterm.c
index b541683e5ad..1add3c415e7 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -5797,6 +5797,7 @@ event_handler_gdk (gxev, ev, data)
5797{ 5797{
5798 XEvent *xev = (XEvent *) gxev; 5798 XEvent *xev = (XEvent *) gxev;
5799 5799
5800 BLOCK_INPUT;
5800 if (current_count >= 0) 5801 if (current_count >= 0)
5801 { 5802 {
5802 struct x_display_info *dpyinfo; 5803 struct x_display_info *dpyinfo;
@@ -5807,23 +5808,27 @@ event_handler_gdk (gxev, ev, data)
5807 /* Filter events for the current X input method. 5808 /* Filter events for the current X input method.
5808 GTK calls XFilterEvent but not for key press and release, 5809 GTK calls XFilterEvent but not for key press and release,
5809 so we do it here. */ 5810 so we do it here. */
5810 if (xev->type == KeyPress || xev->type == KeyRelease) 5811 if ((xev->type == KeyPress || xev->type == KeyRelease)
5811 if (dpyinfo && x_filter_event (dpyinfo, xev)) 5812 && dpyinfo
5812 return GDK_FILTER_REMOVE; 5813 && x_filter_event (dpyinfo, xev))
5814 {
5815 UNBLOCK_INPUT;
5816 return GDK_FILTER_REMOVE;
5817 }
5813#endif 5818#endif
5814 5819
5815 if (! dpyinfo) 5820 if (! dpyinfo)
5816 current_finish = X_EVENT_NORMAL; 5821 current_finish = X_EVENT_NORMAL;
5817 else 5822 else
5818 { 5823 current_count +=
5819 current_count += 5824 handle_one_xevent (dpyinfo, xev, &current_finish,
5820 handle_one_xevent (dpyinfo, xev, &current_finish, 5825 current_hold_quit);
5821 current_hold_quit);
5822 }
5823 } 5826 }
5824 else 5827 else
5825 current_finish = x_dispatch_event (xev, xev->xany.display); 5828 current_finish = x_dispatch_event (xev, xev->xany.display);
5826 5829
5830 UNBLOCK_INPUT;
5831
5827 if (current_finish == X_EVENT_GOTO_OUT || current_finish == X_EVENT_DROP) 5832 if (current_finish == X_EVENT_GOTO_OUT || current_finish == X_EVENT_DROP)
5828 return GDK_FILTER_REMOVE; 5833 return GDK_FILTER_REMOVE;
5829 5834