Subject: bug#13655: 23.2; sit-for doesn't return on input in other X displays

From: Jan Djärv <[email-masked]>
Date: Thu, 21 Feb 2013 19:29:21 +0100

Hi.

20 feb 2013 kl. 17:45 skrev Sean McLaughlin <[email-masked]>:

> Hi Jan,
> 
> Thanks for helping!  We have a workaround, but it's not ideal.  The behavior is not the same as with sit-for, and we much prefer the later behavior.  We are eager to get the fix in place whenever it's ready.  If you have some ideas about how to fix it, we can attempt it ourselves as well.  We'd definitely need some pointers into the code to help though.
> 

call-interactively is in callint.c (around line 235).  It calls temporarily_switch_to_single_kboard (keyboard.c:965) which sets single_kboard to 1.

read_char (keyboard.c:2260) checks single_kboard in many places.
In ths case it is line 2785, if input from another keyboard arrives it just jumps back to wrong_kboard: and keeps reading input, thus not exiting until input arrives from the correct keyboard.

That is about all I know.  Just not calling temporarily_switch_to_single_kboard may solve this, but may have other side effects.

	Jan D.