Supreme Council
Joined: 2006/11/19 18:16 Last Login
: Yesterday 9:46
From London, England
Group:
Webmasters Registered Users
|
@TSK
OK, I'll explain it once more for the last time.
By default, window.class enables the IDCMP_MENUVERIFY bit when the window has helphints enabled (There may also be other situations where this bit is set).
When intuition detects that the right mouse button is pressed, it sends all open windows a MENUVERIFY msg if the window has the above bit set. The windows event loop has to process events in order for the msg to be replied to ( to be precise, the WM_HANDLEINPUT method has to be called).
If a child window is opened, the usual course of action from the application is to run through the events for the child only, so the parent doesn't get a chance to reply to the verify msg thereby stalling intuitions verify check that it's OK to open the menus.
Changes in intuition for Update 1 have made that msg "time out", which is why holding down the button makes the menus appear eventually, after intuition has given up waiting (typically 10 seconds).
The best course of action is to set the WA_BusyPointer attribute on the parent window object with SetAttrs(), this removes the IDCMP_MENUVERIFY bit for the duration that the window is busy. Do not confuse this with the window attribute set with SetWindowAttrs() as this by-passes window.class completely, and won't clear the bit. If you are opening an ASL file requester, you can pass the parent window in ASLFR_SleepWindow and ASL will set the window busy for you, and intuition skips sending the menu verification message to the parent window.
Alternatively, if you want multiple window.class objects open simultaneously, make sure that all events for all objects are handled correctly at all times.
Any program that doesn't handle this is simply not structured correctly, and/or is not adhering to the rules for intuition message handling. It has been this way since OS2.0, and if it worked before then it's more luck than judgement, as this is a well documented "feature".
Further in-depth explanations can be found in the IDCMP section of the Intuition.library chapter of the RKRMs.
Simon
Edited by Rigo on 2010/1/25 0:35:12 Edited by Rigo on 2010/1/25 15:35:56 Edited by Rigo on 2010/7/13 23:59:07
|