Path: utzoo!mnetor!uunet!husc6!bloom-beacon!tut.cis.ohio-state.edu!mailrus!ames!pasteur!ucbvax!ZERMATT.LCS.MIT.EDU!RWS From: RWS@ZERMATT.LCS.MIT.EDU (Robert Scheifler) Newsgroups: comp.windows.x Subject: X11.2 win entry, exit events problem Message-ID: <880409102804.3.RWS@KILLINGTON.LCS.MIT.EDU> Date: 9 Apr 88 14:28:00 GMT References: <3335@fluke.COM> Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 30 This isn't a problem with V11R2. The bug was in V11R1 with sending enter/leave events to them that shouldn't get them, and the bug is in your code, for not asking for them properly, using OwnerGrabButton. BTW, I can't demonstrate the cursor problem noted in your code, and you have made an error (that I've seen many people make) in not understanding what XOR means or how to use it. When I ran your code on an Apollo display, I got no highlighting. Fixes: 187,189d186 < * NOTE: The cursor mask is included; however, this shouldn't be < * necessary, since it should be inherited from the menu frame window. < * Something seems amiss in the way the server is handling this. 192d188 < win_attrs.cursor = menu->cursor; 199c195 < CWEventMask | CWBackPixel | CWBorderPixmap | CWBorderPixel | CWBackingStore | CWCursor, --- > CWEventMask | CWBackPixel | CWBorderPixmap | CWBorderPixel | CWBackingStore, 247c243 < context_values.foreground = BlackPixel(display,screen); --- > context_values.foreground = BlackPixel(display,screen) ^ WhitePixel(display, screen); 337c333 < win_attrs.event_mask = ButtonPressMask | ButtonReleaseMask /* | ButtonMotionMask */; --- > win_attrs.event_mask = ButtonPressMask | ButtonReleaseMask | OwnerGrabButtonMask /* | ButtonMotionMask */; 366c362 < ButtonReleaseMask | EnterWindowMask | LeaveWindowMask, --- > ButtonReleaseMask | EnterWindowMask | LeaveWindowMask | OwnerGrabButtonMask,