🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #9936

Re: following the sliding prop gadget

#9936
From: XMPC2-T.SKROBALA
Date: Sat, 01 Oct 1988 22:17
33 lines
2256 bytes
--
I've found the cause of my problem.  Recall that I wanted to get
MOUSEMOVE (and/or INTUITICKS) messages while I had the select button
pressed down over a prop gadget, and I wasn't getting the messages
until after I released the button.  Well, I was setting gadget->Activation
to GADGIMMEDIATE+FOLLOWMOUSE, which was correct, and the window's IDCMPFlags
included MOUSEMOVE, also correct.

But there was something in my code that was interfering with message
reception.  Every time I received an Intuition message, I was checking
the window's validity within a LockIBase() / UnlockIBase() pair, and
(I guess) Intuition had a lock on the semaphore that prevented LockIBase()
from completing (and thus suspended my program's operation) as long as
the gadget was still sliding around.  As soon as I released the gadget,
I got all the MOUSEMOVE messages that had been queueing up.

When I remove the LockIBase() / UnlockIBase(), I get the MOUSEMOVE
messages as the gadget slides, which is great.

Thanks to all who offered their opinions and generally encouraged me to
keep looking.  Now comes the followup question.  I have the LockIBase()
there because all my windows share a common IDCMP port, and I want to
make sure that I don't process any messages left over from windows that have
been closed, so I check any incoming message's IDCMPWindow to make sure
that it still exists.  I'm not terribly satisfied with this approach
(especially now that it's obviously causing me problems), and I've gotten
the idea here that there is a way to flush all of a window's pending messages
when it is closed.  Is this as simple as installing a GetMsg() loop before
CloseWindow(), or is there more to it?

Thanks again,
Tom Skrobala  AT&T Bell Laboratories  mtuxo!tas  201-957-5446
Technical Details
Message-ID: <2937@mtuxo.att.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!att!mtuxo!tas
References: <2877@mtuxo.att.com> <4875@cbmvax.UUCP> <7263@well.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!att!mtuxo!tas
From: tas@mtuxo.att.com (XMPC2-T.SKROBALA)
Newsgroups: comp.sys.amiga.tech
Subject: Re: following the sliding prop gadget
Summary: LockIBase() was the culprit; followup question on closing windows
Message-ID: <2937@mtuxo.att.com>
Date: 1 Oct 88 22:17:43 GMT
References: <2877@mtuxo.att.com> <4875@cbmvax.UUCP> <7263@well.UUCP>
Distribution: na
Organization: AT&T, Middletown NJ
Lines: 33