Hi,
To finish off the title:
...and an IDCMP port rattling like a machine gun.
When a window (MY window, that is) is active, the IDCMP port gets innundated with mousemove messages, although I modified the IDCMP 'filter' to NOT pass these messages:
if (IIntuition->GetWindowAttr((__GE)->ge_Window[ACTIVEWOID], WA_IDCMP, (APTR)&IDCMP, 4) != 0) { (__GE)->ge_DefaultIDCMP = IDCMP; _PrintFlags(IDCMP); IDCMP = (__GE)->ge_ActiveIDCMP; if (IIntuition->SetWindowAttr((__GE)->ge_Window[ACTIVEWOID], WA_IDCMP, (APTR)&IDCMP, 4) != 0) { # ifdef DEBUG uint32 IDCMP_Modified = 0; if (IIntuition->GetWindowAttr((__GE)->ge_Window[ACTIVEWOID], WA_IDCMP, (APTR)&IDCMP_Modified, 4) != 0) { _PrintFlags(IDCMP_Modified); } _ElseError("Get Window Attribute(s) DEBUG"); # endif } _ElseError("Set Window Attribute(s)"); } _ElseError("Get Attributes");
In this part both _PrintFlags() and _ElseError() are functionlike macros.
The output from _PrintFlags() is this:
FLAGS: * IDCMP [ 0000 1110 1100 1100 0010 0110 0101 1100 ] FLAGS: * IDCMP_Modified [ 0101 0011 0010 1011 0000 1010 0001 1000 ] FLAGS: * IDCMP [ 0000 0000 0000 0000 0100 0000 0110 0010 ]
The 1st line is the IDCMP-flags as default by opening a Window.
The 2nd line is the applied IDCMP-flags after modification (a far cry from...).
The 3rd line is the set of IDCMP-flags I had in mind.
All according to this scheme:
|||| |||| |||| |||| |||| |||| |||| |||| NOTEZ-BIEN --------+||| |||| |||| |||| |||| |||| |||| |||| RESERVED2 ---------+|| |||| |||| |||| |||| |||| |||| |||| RESERVED1 ----------+| |||| |||| |||| |||| |||| |||| |||| EXTENDEDKEYBOARD -----------+ |||| |||| |||| |||| |||| |||| |||| |||| |||| |||| |||| |||| |||| |||| EXTENDEDMOUSE ------------ +||| |||| |||| |||| |||| |||| |||| GADGETHELP ------------ -+|| |||| |||| |||| |||| |||| |||| CHANGEWINDOW ------------ --+| |||| |||| |||| |||| |||| |||| MENUHELP ------------ ---+ |||| |||| |||| |||| |||| |||| |||| |||| |||| |||| |||| |||| IDCMPUPDATE ------------ ---- +||| |||| |||| |||| |||| |||| INTUITICKS ------------ ---- -+|| |||| |||| |||| |||| |||| VANILLAKEY ------------ ---- --+| |||| |||| |||| |||| |||| DELTAMOVE ------------ ---- ---+ |||| |||| |||| |||| |||| |||| |||| |||| |||| |||| INACTIVEWINDOW ------------ ---- ---- +||| |||| |||| |||| |||| ACTIVEWINDOW ------------ ---- ---- -+|| |||| |||| |||| |||| WBENCHMESSAGE ------------ ---- ---- --+| |||| |||| |||| |||| DISKREMOVED ------------ ---- ---- ---+ |||| |||| |||| |||| |||| |||| |||| |||| DISKINSERTED ------------ ---- ---- ---- +||| |||| |||| |||| NEWPREFS ------------ ---- ---- ---- -+|| |||| |||| |||| MENUVERIFY ------------ ---- ---- ---- --+| |||| |||| |||| REQCLEAR ------------ ---- ---- ---- ---+ |||| |||| |||| |||| |||| |||| REQVERIFY ------------ ---- ---- ---- ---- +||| |||| |||| RAWKEY ------------ ---- ---- ---- ---- -+|| |||| |||| CLOSEWINDOW ------------ ---- ---- ---- ---- --+| |||| |||| MENUPICK ------------ ---- ---- ---- ---- ---+ |||| |||| |||| |||| REQSET ------------ ---- ---- ---- ---- ---- +||| |||| GADGETUP ------------ ---- ---- ---- ---- ---- -+|| |||| GADGETDOWN ------------ ---- ---- ---- ---- ---- --+| |||| MOUSEMOVE ------------ ---- ---- ---- ---- ---- ---+ |||| |||| MOUSEBUTTONS ------------ ---- ---- ---- ---- ---- ---- +||| REFRESHWINDOW ------------ ---- ---- ---- ---- ---- ---- -+|| NEWSIZE ------------ ---- ---- ---- ---- ---- ---- --+| SIZEVERIFY -------------------------------------------------+
The WMHI-Class messages I get are (from the console partly):
FLOW : ----- Handle_AllSignals entered FLOW : ------ Handle_WMHISignal entered DEBUG: Message gotten [ 000F0000 ] -- Class [ 15 ] - [ Mousemove ] rejected * FLOW : ------ Handle_WMHISignal vacated FLOW : ------ Handle_WMHISignal entered DEBUG: Message gotten [ 000F0000 ] -- Class [ 15 ] - [ Mousemove ] rejected * FLOW : ------ Handle_WMHISignal vacated FLOW : ------ Handle_WMHISignal entered DEBUG: Message gotten [ 000F0000 ] -- Class [ 15 ] - [ Mousemove ] rejected * FLOW : ------ Handle_WMHISignal vacated FLOW : ------ Handle_WMHISignal entered DEBUG: Message gotten [ 000F0000 ] -- Class [ 15 ] - [ Mousemove ] rejected * FLOW : ------ Handle_WMHISignal vacated FLOW : ------ Handle_WMHISignal entered DEBUG: Message gotten [ 000F0000 ] -- Class [ 15 ] - [ Mousemove ] rejected * FLOW : ------ Handle_WMHISignal vacated FLOW : ------ Handle_WMHISignal entered DEBUG: Message gotten [ 000F0000 ] -- Class [ 15 ] - [ Mousemove ] rejected * FLOW : ------ Handle_WMHISignal vacated FLOW : ------ Handle_WMHISignal entered DEBUG: Message gotten [ 000F0000 ] -- Class [ 15 ] - [ Mousemove ] rejected * FLOW : ------ Handle_WMHISignal vacated FLOW : ------ Handle_WMHISignal entered DEBUG: Message gotten [ 000F0000 ] -- Class [ 15 ] - [ Mousemove ] rejected * FLOW : ------ Handle_WMHISignal vacated FLOW : ------ Handle_WMHISignal entered DEBUG: Message gotten [ 000F0000 ] -- Class [ 15 ] - [ Mousemove ] rejected * FLOW : ------ Handle_WMHISignal vacated
and finally:
FLOW : ------ Handle_WMHISignal entered DEBUG: Message gotten [ 00010000 ] -- Class [ 1 ] - [ Close window ] accepted FLOW : ------- WMHI_CloseWindow entered FLOW : ------- WMHI_CloseWindow vacated FLOW : ------ Handle_WMHISignal vacated FLOW : ----- Handle_AllSignals vacated
and are generated by this function:
BOOL Handle_WMHISignal(struct ExecParam *xn) { INFO_ENTER BOOL Success = FALSE; uint32 MsgClass; while (((__GE)->ge_WMHI_Message = IIntuition->IDoMethod((__GE)->ge_WinObj[ACTIVEWOID], WM_HANDLEINPUT, 0)) != WMHI_LASTMSG) { #ifdef DEBUG IDOS->Printf("DEBUG: Message gotten [ %08lx ] -- Class [ %2lu ]", (__GE)->ge_WMHI_Message, ((__GE)->ge_WMHI_Message & WMHI_CLASSMASK) >> 16); #endif if ( ((MsgClass = ((((__GE)->ge_WMHI_Message & WMHI_CLASSMASK) >> 16) - 1)) < 20) && ((__GE)->ge_WMHIFilter & (1L<<MsgClass)) && ((__GE)->ge_WMHI_ClassJumpTable[MsgClass] != NULL) ) { #ifdef DEBUG IDOS->Printf(" - [ %-15s ] accepted\n", WMHI_Class[MsgClass]); #endif Success = (__GE)->ge_WMHI_ClassJumpTable[MsgClass](xn); } #ifdef DEBUG else { IDOS->Printf(" - [ %-15s ] rejected *\n", WMHI_Class[MsgClass]); } #endif } INFO_VACATE return Success; }
a function in which I incorporated this line:
((__GE)->ge_WMHIFilter & (1L<<MsgClass)) &&
to filter out these unsollicited messages.
Why do I get all these messages?
Why is the applied IDCMP 'filter' so entirely different from BOTH the first automatically generated one AND the one I had in mind?
OldFart
Modified this line
to
and that worked miracles...