Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!uwm.edu!linac!att!ucbvax!BRL.MIL!butler From: butler@BRL.MIL ("Lee A. Butler") Newsgroups: comp.sys.sgi Subject: Bug in gl WRT tie()? Message-ID: <9103220239.aa25408@VMB.BRL.MIL> Date: 22 Mar 91 07:39:45 GMT Sender: usenet@ucbvax.BERKELEY.EDU Organization: Ballistic Research Laboratory Lines: 90 It looks to me like the tie() facility does not function properly when used in conjunction with a button on the dial/button box. The 50 line program below demonstrates my problem. Once it is started, and the mouse is positioned in the window which is opened, WITHOUT MOVING THE MOUSE, I press and release the MOUSE2 button and then the SW1 button on the dial box. The output results are as follows: % tgl User Dev: 534 value: 4 Mouse2 1 MouseX 202 MouseY 22 Mouse2 0 MouseX 202 MouseY 22 SW1 1 MouseX 202 MouseX 202 SW1 0 MouseX 202 MouseX 202 Mouse1 1 Yet I really did queue MOUSEX and MOUSEY to SW1, not 2 instances of MOUSEX. ----------------------- Program code ------------------------------------ #include #include main() { int win; short i=1; short dev, val; foreground(); win = winopen("Bogosity Demo"); qdevice(MOUSE1); qdevice(MOUSE2); tie(MOUSE2, MOUSEX, MOUSEY); qdevice(SW1); tie(SW1, MOUSEX, MOUSEY); while (i) while (qtest()) { dev = qread(&val); switch (dev) { case SW1: printf("SW1 %d\n", val); break; case MOUSE1: printf("Mouse1 %d\n", val); i = 0; break; case MOUSE2: printf("Mouse2 %d\n", val); break; case MOUSEX: printf("MouseX %d\n", val); break; case MOUSEY: printf("MouseY %d\n", val); break; default: printf("User Dev: %d value: %d\n", dev, val); break; } } return(0); } ---------------------------------------------------------------------- For the curious, this was on a 4D/240 running 3.3 Lee A. Butler SLCBR-VL-V Internet: butler@brl.mil Ballistic Research Laboratory Phone: (301) 278-9200 Aberdeen Proving Ground, MD 21005-5066