Path: utzoo!utgpu!watmath!clyde!att!rutgers!rochester!pt.cs.cmu.edu!andrew.cmu.edu!dp1g+ From: dp1g+@andrew.cmu.edu (Demetri Patukas) Newsgroups: comp.sys.amiga.tech Subject: ReportMouse() problems! Message-ID: <0XXZpjy00WB68VnEMd@andrew.cmu.edu> Date: 26 Nov 88 07:29:51 GMT Organization: Carnegie Mellon Lines: 37 Why doesn't ReportMouse() work for me? I have a window, I have an IDCMP. I would like to recieve MOUSEMOVE messages only when the left button is down, so I thought I would watch for MOUSEBUTTON messages and call ReportMouse(window,TRUE) when I get a class==SELECTDOWN, and ReportMouse(window,FALSE) when I get a class==SELECTUP. Well, I am having problems with ReportMouse(). When I call ReportMouse(window,FALSE), nothing happens (I continue to recieve MOUSEMOVEs), and when I call ReportMouse(window,TRUE), I get a big ol' guru! This happens no matter where in my program I call it. I thought I might achieve the same thing instead by using ModifyIDCMP, and changing MOUSEMOVE when I get the appropriate MOUSEBUTTONs (though I don't like this approach as much). Well, whenever I call ModifyIDCMP(window, anyflags), I lose MOUSEMOVEs totally. Even if MOUSEMOVEs are on and I request that they stay on. Can anyone tell me what's wrong? Is there something conceptually wrong with this? Or am I just missing some detail? More Info: "window" is a pointer to a struct window as returned from OpenWindow. My window is a backdrop window, but I have tried it on a normal window too. I am reading messages off of window->UserPort. And here's a small piece of code (from my event loop): if (class & MOUSEBUTTONS) { if (code & SELECTDOWN) ModifyIDCMP(window,MOUSEMOVE | IDCMPflags); if (code & SELECTUP) ModifyIDCMP(window,IDCMPflags); -or- if (class & MOUSEBUTTONS) { if (code & SELECTDOWN) ReportMouse(window,TRUE); if (code & SELECTUP) ReportMouse(window,FALSE); (please cc: me a copy of replies, I'll get it quicker than wading through posts) --demetri