Path: utzoo!attcan!uunet!lll-winken!ncis.llnl.gov!helios.ee.lbl.gov!pasteur!agate!bionet!csd4.milw.wisc.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!dsg.csc.ti.COM!Kimbrough From: Kimbrough@dsg.csc.ti.COM (Kerry Kimbrough) Newsgroups: comp.windows.x Subject: Re: Expose, EnterNotify events Message-ID: <2810306070-14946088@Sierra> Date: 20 Jan 89 16:34:30 GMT Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 27 > > Hi: I have a ttyWidget that expects to draw the cursor when it > > receives an EnterNotify event (sort of like emacs). > > Use FocusIn event, instead. > > This doesn't work. I should have mentioned that I have something like > > static char default_translations[] = > ": tty_callback() \n\ > : tty_highlight() \n\ > : tty_unhighlight()"; > > for doing this.. If I change the translations to be and > , the two routines never seem to get invoked.. Undoubtedly, you running with focus=PointerRoot, the default situation unless you're using a window manager (or some other bold client) that enforces click-to-type. In this case, when the pointer moves into window W, then W becomes the effective keyboard focus, but W will never get FocusIn/Out events. At least that's my observation of server behavior. Under a Talmudic interpretation of the Protocol, this is legit since the fact that focus=PointerRoot has not changed. In practice, however, this amounts to a defect in the protocol, because it severely constrains the usefulness of FocusIn/Out.