[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] XaAES: menus in windows - window handle?



Am 09.08.2010, 20:55 Uhr, schrieb Jo Even Skarstein <joska@online.no>:

On 08/09/2010 05:24 PM, Lonny Pursell wrote:

Well, this is simple.  The old menu message should be left alone, and a
completely new message defined for menus inside windows. That's the obvious way to maintain backward compatibility. Anything else is just insane if it
starts breaking all the GEM apps already out there. :-P

If I'm not mistaken the normal/standard menu is just a menu widget
belonging to the root window. So window-menus behaves and works exactly
as the "normal" menu. I suggest a simple modification to detect whether
a menu event comes from the root window or not:

1. Root window (normal menu): Leave it like today.
2. Any other window: Send -(window handle) instead of sender's apid.

So if msg[1] (IIRC) is negative, it's the handle of the window that owns
the menu. So the window becomes the sender. This doesn't break anything
and it's easy to detect where the window message comes from.

I didn't know that the client may not know if it has a windowed menu or not (or maybe some have both?). If so, there should really always be an additional information in the message.

In case XaAES is the only AES that implements windowed menus, why not pass more valuable things than the rsc-addr? The client should know this anyway, shouldn't it?

--
Helmut Karlowski