EnterNotify/SetInputFocus serialization problem

Ken Olum kdo@cosmos.phy.tufts.edu
Tue Apr 8 01:14:00 GMT 2008

I'm suffering from a bug in which when I move the mouse across one
window and into another under vtwm/twm, the focus goes to the final
window but then back to the intermediate window.  I can reproduce it
as follows: Create a remote firefox window with two local xterm
windows partly covering it.  Run twm or vtwm locally as window
manager.  Don't set NoTitleFocus.  Move mouse quickly from first xterm
across firefox and into second xterm.  First the second xterm gets
focus as it should, but then the focus goes back to firefox.

I've tried to track this down with xmsgtrace.  It appears that
cygwin/X is generating EnterNotify events for both the firefox window
and the xterm window with the same timestamp.  This seems wrong,
because the windows have no way to tell which was entered last.

Here are the relevant parts of the protocol trace.  The whole trace up
through the problem is attached.  This is in Xorg

                                        Ken Olum

139 (1689253250) Event(EnterNotify[7]): client=1, seq=80389, detail:NonlinearVirtual timestamp:1689253250 rootwin:0x3e eventwin:0xc10b37 childwin:0xc10b40
140 (1689253250)      root-x:735 root-y:289 event-x:274 event-y:269 KeyButMask:0x0 mode:Normal
-> Client 1 = twm.  Window 0xc10b37 is one of the firefox windows.

237 (1689253250) Event(EnterNotify[7]): client=1, seq=80415, detail:NonlinearVirtual timestamp:1689253250 rootwin:0x3e eventwin:0x140000d childwin:0x1400011
238 (1689253250)      root-x:685 root-y:295 event-x:483 event-y:213 KeyButMask:0x0 mode:Normal
-> Window 0x140000d = xterm.  Note same timestamp.

201 (1689253250) Request(SetInputFocus[42]):client=1 seq=80413 revert-to:PointerRoot window:0xc10b37 time:1689253250
-> Twm gives focus to Firefox.

318 (1689253265) Request(SetInputFocus[42]):client=1 seq=80446 revert-to:PointerRoot window:0x140000d time:1689253250
-> Twm gives focus to xterm, with same timestamp.

425 (1689253312) Request(SetInputFocus[42]):client=6 seq=2130107 revert-to:Parent window:0xc10b38 time:1689253250
-> Firefox gives focus to a different subwindow, with same timestamp, causing focus to go back to Firefox from xterm.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xmsgtrace.log
Type: application/octet-stream
Size: 38343 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-xfree/attachments/20080408/3eb6cfbb/attachment.obj>
-------------- next part --------------
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/

More information about the Cygwin-xfree mailing list