On Wed, Jan 28, 2009 at 12:37:20PM +0000, Thomas Adam wrote:
> could attach xev to one of the XTerms to find out what the client is
> receiving in terms of focus, but that's kind of irrelevant by this
> point, as FVWM will have already done its job by that point.

I tried xev, and do indeed get keystrokes. But I don't know if the xev
window behaves exactly like xterm in this aspect.

I did an strace on the xterm. After the xterm above is minimized, the
xterm gets exposed with the mouse cursor inside, and I hit <space>, a
key seems to arrive because the 'select' returns immediately:

select(6, [3 5], [], NULL, NULL)        = 1 (in [3])
read(3, "\10\4\24\26\340\234E\1\211\0\0\0$\0`\2/\0`\2\22\2\352\2"..., 4096) = 32
read(3, 0x8d2474c, 4096)                = -1 EAGAIN (Resource temporarily 
unavailable)
poll([{fd=3, events=POLLIN}], 1, 0)     = 0
poll([{fd=3, events=POLLIN}], 1, 0)     = 0
poll([{fd=3, events=POLLIN}], 1, 0)     = 0
read(3, 0x8d2474c, 4096)                = -1 EAGAIN (Resource temporarily 
unavailable)
read(3, 0x8d2474c, 4096)                = -1 EAGAIN (Resource temporarily 
unavailable)
poll([{fd=3, events=POLLIN}], 1, 0)     = 0
read(3, 0x8d2474c, 4096)                = -1 EAGAIN (Resource temporarily 
unavailable)
read(3, 0x8d2474c, 4096)                = -1 EAGAIN (Resource temporarily 
unavailable)
read(3, 0x8d2474c, 4096)                = -1 EAGAIN (Resource temporarily 
unavailable)
poll([{fd=3, events=POLLIN}], 1, 0)     = 0
select(6, [3 5], [], NULL, NULL)        = 1 (in [3])
read(3, "\n\3\24\26$\0`\2\0\362\267\10(\231\267\10\330\310\327\277"..., 4096) = 
32
read(3, 0x8d2474c, 4096)                = -1 EAGAIN (Resource temporarily 
unavailable)
poll([{fd=3, events=POLLIN}], 1, 0)     = 0
poll([{fd=3, events=POLLIN}], 1, 0)     = 0
poll([{fd=3, events=POLLIN}], 1, 0)     = 0
select(4, [3], [3], NULL, NULL)         = 1 (out [3])
writev(3, [{"\31\0\v\0000\0\240\0\0\0\0\0!\10\0\0000\0\240\0\301\1\0"..., 44}], 
1) = 44
read(3, 0x8d2474c, 4096)                = -1 EAGAIN (Resource temporarily 
unavailable)
read(3, 0x8d2474c, 4096)                = -1 EAGAIN (Resource temporarily 
unavailable)
select(4, [3], [3], NULL, NULL)         = 1 (out [3])
writev(3, [{"M\1\5\0/\0`\0022\0`\2t\0p\2\0 \240\0A\1\10\0/\0`\0023\0"..., 52}], 
1) = 52
read(3, 0x8d2474c, 4096)                = -1 EAGAIN (Resource temporarily 
unavailable)
poll([{fd=3, events=POLLIN}], 1, 0)     = 0
read(3, 0x8d2474c, 4096)                = -1 EAGAIN (Resource temporarily 
unavailable)
read(3, 0x8d2474c, 4096)                = -1 EAGAIN (Resource temporarily 
unavailable)
read(3, 0x8d2474c, 4096)                = -1 EAGAIN (Resource temporarily 
unavailable)
poll([{fd=3, events=POLLIN}], 1, 0)     = 0


But under "normal" operation, when keystrokes are accepted, I see
additional I/O on file descriptor 5 after the 'poll' calls, e.g when I
hit 'c'

poll([{fd=3, events=POLLIN}], 1, 0)     = 0
select(4, [3], [3], NULL, NULL)         = 1 (out [3])
writev(3, [{"\31\0\v\0000\0\240\0\0\0\0\0!\10\0\0000\0\240\0\301\1\0"..., 44}], 
1) = 44
read(3, 0x8d2474c, 4096)                = -1 EAGAIN (Resource temporarily 
unavailable)
write(5, "c", 1)                        = 1                                     
          <--- here the "c" appears
read(3, 0x8d2474c, 4096)                = -1 EAGAIN (Resource temporarily 
unavailable)
read(3, 0x8d2474c, 4096)                = -1 EAGAIN (Resource temporarily 
unavailable)
poll([{fd=3, events=POLLIN}], 1, 0)     = 0
read(3, 0x8d2474c, 4096)                = -1 EAGAIN (Resource temporarily 
unavailable)
read(3, 0x8d2474c, 4096)                = -1 EAGAIN (Resource temporarily 
unavailable)
read(3, 0x8d2474c, 4096)                = -1 EAGAIN (Resource temporarily 
unavailable)
poll([{fd=3, events=POLLIN}], 1, 0)     = 0
select(6, [3 5], [], NULL, NULL)        = 1 (in [5])
read(3, 0x8d2474c, 4096)                = -1 EAGAIN (Resource temporarily 
unavailable)
read(3, 0x8d2474c, 4096)                = -1 EAGAIN (Resource temporarily 
unavailable)
poll([{fd=3, events=POLLIN}], 1, 0)     = 0
read(5, "c", 4096)                      = 1                                     
          <--- here too
read(5, 0x8d563dc, 4096)                = -1 EAGAIN (Resource temporarily 
unavailable)
select(4, [3], [3], NULL, NULL)         = 1 (out [3])
writev(3, [{"M\1\5\0/\0`\0022\0`\2\200\0p\2\0 \240\0M\1\5\0/\0`\002"..., 168}], 
1) = 168
read(3, 0x8d2474c, 4096)                = -1 EAGAIN (Resource temporarily 
unavailable)

So it seems these event simply don't get through to xterm.

Cheers,
- Alex

Reply via email to