Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!pacbell.com!ucsd!nosc!cod!healy From: healy@cod.NOSC.MIL (Mike Healy) Newsgroups: comp.sys.atari.st.tech Subject: Re: Windows and Events Questions -- Follow Up Keywords: mouse buttons Message-ID: <3026@cod.NOSC.MIL> Date: 1 May 91 04:22:55 GMT References: <1991Apr26.182518.24869@jato.jpl.nasa.gov> <3016@cod.NOSC.MIL> <1991Apr29.082634.12301@informatik.uni-erlangen.de> Organization: Naval Ocean Systems Center, San Diego Lines: 98 In article <1991Apr29.082634.12301@informatik.uni-erlangen.de> csbrod@immd4.informatik.uni-erlangen.de (Claus Brod) writes: >healy@cod.NOSC.MIL (Mike Healy) writes: > > ... stuff deleted > >Please keep in mind that the method I suggested is inofficial. It is >being inspected at Atari and might be legalized (should be, if you >ask me 8-) one day, but use it with caution until they give us green >light. > >>I am having a problem that hopefully someone else has >>When I execute my program from within the Laser shell, the >>event_multi call works fine. When I execute my program >>from the desktop, the event_multi call will not receive >>mouse button events. It's as if something is intercepting >>them. My event_multi call is checking for keyboard and mouse >>button input and the keyboard input works. Using event_mbutton >>instead of event_multi has no effect. > >Maybe you could provide us with a short extract from your evnt_multi >loop and init code. I don't think it has anything to do with AUTO >folder programs or other interdependencies. > I call appl_init when I start up. /* Here is the code that works fine when executed from the Laser C shell but won't respond to the mouse buttons when run from the desktop */ int p_wait() { int ev_mmflags = 0x3; /* keyboard evnt & mouse evnt */ int ev_mbclicks = 1 | 256, ev_mbmask = 3, ev_mbstate = 0 ; int ev_mm1flags = 0 ; int ev_mm1x, ev_mm1y, ev_mm1height, ev_mm1width ; int ev_mm2flags = 0, ev_mm2x, ev_mm2y, ev_mm2height, ev_mm2width ; int ev_mtlocount, ev_mthicount, ev_mmox, ev_mmoy ; int ev_mmobutton, ev_mmokstate, ev_mkreturn, ev_mbreturn ; int ev_mmgpbuff[8] ; int status ; #ifdef DEBUG_P_WAIT printf("calling evnt_multi, Numahead = %d\n", Numahead) ; #endif /* No it's not returning here when run from the desktop. I have to strike a key to get it to return */ if( Numahead > 0 ) return P_KEY ; status = evnt_multi( ev_mmflags, ev_mbclicks, ev_mbmask, ev_mbstate, ev_mm1flags, ev_mm1x, ev_mm1y, ev_mm1width, ev_mm1height, ev_mm2flags, ev_mm2x, ev_mm2y, ev_mm2width, ev_mm2height, ev_mmgpbuff, ev_mtlocount, ev_mthicount, &ev_mmox, &ev_mmoy, &ev_mmobutton, &ev_mmokstate, &ev_mkreturn, &ev_mbreturn ) ; #ifdef DEBUG_P_WAIT printf("evnt_multi status: 0x%x\n", status ) ; #endif if( status & 0x2 ) return P_MOUSE ; else if( status & 0x1 ) { /* stuff keyboard entry into console input buffer */ #ifdef DEBUG_P_WAIT printf("ev_mkreturn = %c (0x%2.2x)\n", ev_mkreturn, ev_mkreturn) ; #endif Nextinchars[Numahead++] = ev_mkreturn ; return P_KEY ; } /* shouldn't get here */ return P_KEY ; } When I run from the desktop with my debug statements turned on, I don't get a return and status from evnt_multi until I use the keyboard. The setting of the high bit in mb_clicks is not the cause. Giving it a mask for the left mouse button without the logical negation, the simplest case, it still has the same problem. I have hardly run the program outside of Laser c, but I think it was working from the desktop previously. Any ideas? Mike Healy healy@cod.nosc.mil