Path: utzoo!attcan!uunet!lll-winken!lll-lcc!ncis.llnl.gov!ncis!helios.ee.lbl.gov!nosc!ucsd!ucbvax!bloom-beacon!WHEATIES.AI.MIT.EDU!sundar From: sundar@WHEATIES.AI.MIT.EDU (Sundar Narasimhan) Newsgroups: comp.windows.x Subject: Expose, EnterNotify events Message-ID: <8901190105.AA10095@special-k.ai.mit.edu> Date: 19 Jan 89 01:05:50 GMT Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 28 Hi: I have a ttyWidget that expects to draw the cursor when it receives an EnterNotify event (sort of like emacs). It also expects to redraw the entire text in it when it receives an Expose event. This works fine normally, but when the user uses a chorded window-manager key (like say Meta-LEFT) to circulate the window up from a behind a whole stack of windows, the widget seems to get the Expose all right, but not the EnterNotify event. Needless to say, this causes the text to be displayed correctly, but not the cursor. This is somewhat annoying. Can someone explain to me what the right behaviour (at the widget level) should be? (Should Expose be really treated as Expose&EnterNotify)? Secondly, in R3, what is the right way to deal with the mouse cursor when you are managing text in a widget by yourself? The reason I ask this is that in my ttyWidget since I have to manage the block cursor myself, I have to paint the characters in inversevideo myself (I am using XDrawImageString for this). However, when I do this I notice that sometimes the mouse cursor causes silly turd like droppings on the screen if it happens to be near where my text cursor is. Is one supposed to hide the mouse cursor before calling XDrawImageString? How does one prevent the mouse cursor from interacting with XDrawImageString, or is there something else I am doing wrong? -Sundar Why, oh why do we have to worry about cursors ?! (Every program is now going to have to maintain state for this, what fun!)