On Tue, 2 Jan 2001 [EMAIL PROTECTED] wrote:
[...]
> I notice however that all the icons that should be
> on the right hand end of the menu bar are still positioned immediately to
> the right of the rightmost text menu item.  I seem to recall that this was
> discussed some while ago, and was thought to have been fixed.
> 
> Is this an area anyone is working on, or can someone give me a clue as to
> what is suppose to be happening here and I will try to fix it myself.


   Yes, I've been working on it this weekend. I have a patch that fixes
this but I wanted to check whether it was doing the right thing wrt. the
mysterious 'magic items'.
   Well, I'd say it does do the right thing but the rest of Wine's code
does not. 'Magic items' are real weird. For one wherever you insert them
they always appear to the right of the righmost non-magic item. So if
your code creates the following

  File HBMMENU_MBAR_RESTORE Edit HBMMENU_MBAR_CLOSE Tools

what you see is:

  File Edit Tools HBMMENU_MBAR_RESTORE HBMMENU_MBAR_CLOSE

   So they are reordered at some point. I'm not sure when though (on
insertion or on display). Also some of them have no visible icon (e.g.
HBMMENU_POPUP_CLOSE) but I guess these are not supposed to be put in a
menu anyway (Wine warns that it does not support that one).
   Finally they are not supposed to be inverted when one clicks on them.
It gives me the impression that there might be all sorts of other
special cases surrounding them. It's depressing.
   Ah, also, in MDI interfaces, the 'system menu' on the left does not
appear to be a magic item. And it too gets a special handling in Windows
(no look change when you click on it).

   And one more thing. The way we test for magic items is as follows:

   if ( (LOWORD((int)lpitem->text)) < 12 )

   But if the value of lpitem->text is 0x3450005 then
LOWORD((int)lpitem->text) is 5 and thus we'll take it for a magic item.
Is that where the 'unknown magic item 0' come from? In any case it seems
to me like we should use a macro to do this test (to be sure we do it
wrong the same way everywhere :-).


   Well, AFAICT this should all be independent from the patch fixing the
menu alignment so I'm posting it to wine-patches.


--
Francois Gouget         [EMAIL PROTECTED]        http://fgouget.free.fr/
                           La terre est une bêta...



Reply via email to