I'm curious if anyone else is seeing this.

The way I can reproduce this behavior is by using any sort of program
which generates XInput events very rapidly (in my particular case, the
program was plover).  Below the fold is a test program which pretty
reliably hangs rxvt-unicode (you'll need python-xlib).  Can anyone else
try to reproduce?

Note: if you're running a WM like xmonad which can't close the terminal
if it hangs, use 'xdotool selectwindow windowkill' to kill it.

Edward

~~~~

from Xlib import X, XK, display
from Xlib.ext import record, xtest
from Xlib.protocol import rq, event
from Xlib.xobject import drawable
import time

display = display.Display()
screen = display.screen()
w = display.get_input_focus().focus
assert isinstance(w, drawable.Window)

events = [
            (38,X.KeyPress),
            (38,X.KeyRelease),
            (39,X.KeyPress),
            (39,X.KeyRelease),
            (38,X.KeyPress),
            (38,X.KeyRelease),
            (39,X.KeyPress),
            (39,X.KeyRelease),
            (38,X.KeyPress),
            (38,X.KeyRelease),
            (39,X.KeyPress),
            (39,X.KeyRelease),
            (38,X.KeyPress),
            (38,X.KeyRelease),
            (39,X.KeyPress),
            (39,X.KeyRelease),
            (38,X.KeyPress),
            (38,X.KeyRelease),
            (39,X.KeyPress),
            (39,X.KeyRelease),
            (38,X.KeyPress),
            (38,X.KeyRelease),
            (39,X.KeyPress),
            (39,X.KeyRelease),
            (38,X.KeyPress),
            (38,X.KeyRelease),
            (39,X.KeyPress),
            (39,X.KeyRelease),
            (38,X.KeyPress),
            (38,X.KeyRelease),
            (39,X.KeyPress),
            (39,X.KeyRelease),
            (38,X.KeyPress),
            (38,X.KeyRelease),
            (39,X.KeyPress),
            (39,X.KeyRelease),
            (38,X.KeyPress),
            (38,X.KeyRelease),
            (39,X.KeyPress),
            (39,X.KeyRelease),
            (38,X.KeyPress),
            (38,X.KeyRelease),
            (39,X.KeyPress),
            (39,X.KeyRelease),
            (38,X.KeyPress),
            (38,X.KeyRelease),
            (39,X.KeyPress),
            (39,X.KeyRelease),
            (38,X.KeyPress),
            (38,X.KeyRelease),
            (39,X.KeyPress),
            (39,X.KeyRelease)
         ]

w.grab_keyboard(False, X.GrabModeAsync, X.GrabModeAsync, X.CurrentTime)
while True:
    e = display.next_event()
    if (e.type == X.KeyPress):
        display.ungrab_keyboard(X.CurrentTime)
        for keycode, event_type in events:
            xtest.fake_input(w, event_type, keycode)

_______________________________________________
rxvt-unicode mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/rxvt-unicode

Reply via email to