Article View: comp.windows.interviews
Article #697Re: Input handling in a GL window
From: Mark Linton
Date: Thu, 01 Oct 1992 20:32
Date: Thu, 01 Oct 1992 20:32
27 lines
1660 bytes
1660 bytes
In article <1992Sep30.220957.31057@m.cs.uiuc.edu>, zhou@m.cs.uiuc.edu (Tom Zhou) writes:
|> My GL window doesn't seem to take device input!
|> I'm using a variation of GLContext. I used an InputHandler to wrap the
|> GLContext instance (or to be wrapped by the GLContext -- I tried both
|> ways). But this InputHandler doesn't receive anything but key stroke
|> events. (I figure key strokes reach the GL input handler through some
|> weird focusing mechanism that I don't understand yet). A trace reveals
|> that GLWindow::receive(Event&) never gets called.
This is a bug in GLContext. It inherits the default window behavior,
which is not to propagage events outward.
Here's the fix:
*** /tmp/,RCSt1a10489 Thu Oct 1 13:31:06 1992
--- glcontext.c Tue Sep 15 17:20:45 1992
***************
*** 192,197 ****
--- 192,199 ----
t->remove(xw);
}
Window::set_attributes();
+ w->xattrmask_ &= ~CWDontPropagate;
+ w->xattrs_.do_not_propagate_mask = 0;
w->xattrmask_ |= CWColormap;
w->xattrs_.colormap = colormap_;
w->xattrs_.event_mask = ExposureMask | StructureNotifyMask;
Technical Details
Message-ID:
<1afn90INNko9@fido.asd.sgi.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!sgigate!odin!fido!marktwain.rad.sgi.com!lintonReferences:
<1992Sep30.220957.31057@m.cs.uiuc.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!sgigate!odin!fido!marktwain.rad.sgi.com!linton From: linton@marktwain.rad.sgi.com (Mark Linton) Newsgroups: comp.windows.interviews Subject: Re: Input handling in a GL window Date: 1 Oct 1992 20:32:32 GMT Organization: sgi Lines: 27 Distribution: world Message-ID: <1afn90INNko9@fido.asd.sgi.com> References: <1992Sep30.220957.31057@m.cs.uiuc.edu> Reply-To: linton@marktwain.rad.sgi.com (Mark Linton) NNTP-Posting-Host: marktwain.rad.sgi.com