vsnyder@jato.jpl.nasa.gov (Van Snyder) (04/27/91)
I've solved half of the problems about which I previously inquired. Answers follow: In article <1991Apr22.072944.1120@jato.jpl.nasa.gov> vsnyder@jato.Jpl.Nasa.Gov (Van Snyder) writes: >In ONE of several similarly designed programs, the name and info lines >of windows get crud when another window is topped, e.g. Control Panel. >I remember reading something to be careful about with these data, but >I'll be damned if I can find it again! I was careful to make both of >them static (non-stack) strings. Does anybody remember what to do so >this doesn't happen? The suspected problem was in fact the true problem: The strings were on the stack, so when AES re-drew the windows the address pointed at crud. The problem was that TDI Modula makes a local copy of arguments that are ARRAY OF CHAR if they're not VAR. >If I create a window with WindowCreate(...Closer+InfoLine+Name...), then >do WindowSet(...Closer+Name...) and then WindowGet(...WorkXYWH,x,y,w,h), >the rectangle that comes back is as though the InfoLine were still there. >The picture on the screen, and the behaviour when redrawing or topping >verifies this. Is there a way to make the InfoLine temporarily go away, >or must one destroy the window and re-create it? No answer yet. Anybody have ideas (Allan?) >When window B is atop window A, and window B is moved, window A is told (using WindowGet with FirstXYWH and NextXYWH) >to redraw everything of it that shows. How can one repaint just those >parts that are newly exposed? It's not too hard when dealing only with >windows the program owns, but what about DA windows? No answer yet. Anybody have ideas? >How can one wait for left OR right mouse button with Event<...>? >EventButton and EventMultiple wait for left AND right mouse button down >if the mask and button arguments are both 3. Claus Brod answered this in <1991Apr22.154354.16919@informatik.uni-erlangen.de> >Any help, on any question, would be appreciated. To ensure me receiving >it, please e-mail answers. Of course, if you think others will be >interested, post also. -- vsnyder@jato.Jpl.Nasa.Gov ames!elroy!jato!vsnyder vsnyder@jato.uucp
healy@cod.NOSC.MIL (Mike Healy) (04/27/91)
Regarding Claus Brod's suggestion for getting one or the other mouse button with event_mbutton or event_multi, thanks, it helped me out. I am having a problem that hopefully someone else has already encountered and solved. I am running TOS1.4 on a 1040STF with 4 megs, using LASER C 1.0. 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. I have tried disabling all the junk in my auto folder, to no effect. It seems weird that something that runs ok out of a shell wouldn't run off the desktop. If the solution is to upgrade Laser C, I would like to. Does anyone know Megamax's phone # & address. I have written to the address in my manual requesting an upgrade but have received no reply. Thanks Mike Healy healy@cod.nosc.mil
csbrod@immd4.informatik.uni-erlangen.de (Claus Brod) (04/29/91)
vsnyder@jato.jpl.nasa.gov (Van Snyder) writes: >>When window B is atop window A, and window B is moved, window A is told > (using WindowGet with FirstXYWH and NextXYWH) >>to redraw everything of it that shows. How can one repaint just those >>parts that are newly exposed? It's not too hard when dealing only with >>windows the program owns, but what about DA windows? This is normal SCREENMGR behavior. In fact, the KAOS programmers tried to add a 'smart redraw' option to their TOS version. It turned out that quite a few programs didn't like this and messes up their redraw. I don't understand though why one would like to redraw other program's windows, like those of a DA. Can you be more explicit? ---------------------------------------------------------------------- Claus Brod, Am Felsenkeller 2, Things. Take. Time. D-8772 Marktheidenfeld, West Germany (Piet Hein) csbrod@medusa.informatik.uni-erlangen.de Claus Brod@wue.maus.de ----------------------------------------------------------------------
csbrod@immd4.informatik.uni-erlangen.de (Claus Brod) (04/29/91)
healy@cod.NOSC.MIL (Mike Healy) writes: >Regarding Claus Brod's suggestion for getting one or the >other mouse button with event_mbutton or event_multi, >thanks, it helped me out. 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. ---------------------------------------------------------------------- Claus Brod, Am Felsenkeller 2, Things. Take. Time. D-8772 Marktheidenfeld, West Germany (Piet Hein) csbrod@medusa.informatik.uni-erlangen.de Claus Brod@wue.maus.de ----------------------------------------------------------------------
healy@cod.NOSC.MIL (Mike Healy) (05/01/91)
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