From 2b06f8e9eb166ecd3d3614ce386b560346bd9b53 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Mon, 30 Sep 1996 18:31:14 +0000 Subject: [PATCH] In x-window-set-input-focus, flush the display queue right away. Otherwise, the error-catching code from the previous revision will have no effect since the command will be sent later. --- v7/src/microcode/x11base.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/v7/src/microcode/x11base.c b/v7/src/microcode/x11base.c index 62a76b5e7..e0ee34dc6 100644 --- a/v7/src/microcode/x11base.c +++ b/v7/src/microcode/x11base.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: x11base.c,v 1.63 1996/09/20 18:54:48 cph Exp $ +$Id: x11base.c,v 1.64 1996/09/30 18:31:14 cph Exp $ Copyright (c) 1989-95 Massachusetts Institute of Technology @@ -1924,11 +1924,17 @@ DEFINE_PRIMITIVE ("X-WINDOW-SET-INPUT-FOCUS", Prim_x_window_set_input_focus, 2, CATCH_X_ERRORS (status); if (status == 0) - XSetInputFocus - ((XW_DISPLAY (xw)), - (XW_WINDOW (xw)), - RevertToParent, - ((Time) (arg_ulong_integer (2)))); + { + Display * display = (XW_DISPLAY (xw)); + XSetInputFocus + (display, + (XW_WINDOW (xw)), + RevertToParent, + ((Time) (arg_ulong_integer (2)))); + /* Force the message out now; otherwise the error-catching + code will be ineffective. */ + XFlush (display); + } else error_bad_range_arg (1); } -- 2.25.1