toolbar.c problem (ATTN: Duane)

Dusan Vujosevic dusanv at cadlink.com
Thu Apr 18 15:56:08 CDT 2002


Hello,

----- Original Message -----
From: "Duane Clark" <dclark at akamail.com>
To: "Dusan Vujosevic" <dusanv at cadlink.com>
Cc: <wine-devel at winehq.com>
Sent: Thursday, April 18, 2002 12:44 PM
Subject: Re: toolbar.c problem (ATTN: Duane)


> Dusan Vujosevic wrote:
> > Hi,
> >
> > I am having a problem with the way toolbar.c was modified between
> > revisions 1.107 & 1.108. My application (Signlab) pops flyout toolbars
> > that stay around until they lose focus. The parent toolbar receives a
> > 'TBN_DROPDOWN' message when someone clicks on one of its flyout buttons
> > (button style: TBSTYLE_DROPDOWN). It creates a flyout at that point.
> >
> > With revision 1.108 of toolbar.c in Wine the parent toolbar also
> > receives an WN_COMMAND after TBN_DROPDOWN message which causes Wine
> > (rightly so) to send an WM_SETFOCUS (and WM_ACTIVATE). That causes the
> > parent to regain focus and kills the flyout. The line that sends
> > the WN_COMMAND is in toolbar.c at line 4540 (TOOLBAR_LButtonUp()
function):
> >         SendMessageA (infoPtr->hwndNotify, WM_COMMAND,
> >           MAKEWPARAM(infoPtr->buttons[nHit].idCommand, 0),
(LPARAM)hwnd);
> > In revision 1.107 it used to be:
> >
> > if (bSendMessage)
> >      SendMessageA (infoPtr->hwndNotify, WM_COMMAND,
> >      MAKEWPARAM(btnPtr->idCommand, 0), (LPARAM)hwnd);
> >
> > And that worked fine because it would never send WM_COMMAND for a flyout
> > button. Note that WinXP (that's where I tested) doesn't send WM_COMMAND
> > after TBN_DROPDOWN has been handled. I would like to suggest revert that
> > line back to 1.106 because it is the correct way.
>
> It is not "the correct way", since I have tested it with control spy
> under WinNT and Wine. That is not to say that my patch is correct
> either, but it fixes two different applications I have and in my mind is
> closer to the correct way. There may well be some conditions under which
> the message should not be sent, but the previous way was not correct.

How about we test whether the button has TBSTYLE_DROPDOWN
style set and not send the message in that case???

> So
> I guess Alexandre gets to pick which incorrect version to use ;)

Hm :/

> And there is more going on in your app, because the flying toolbars also
> disappear when the mouse is simply slid over them, without clicking.

Wine or Windows? I don't follow this / can't reproduce it under either one.

> This behavior is not there under Windows, and has nothing to do with the
> ButtonUp change I made. The two may not be related, but I cannot help
> thinking they are. Unfortunately, I was not able to get a spy program to
> work with your app in windows, so I have not been able to figure out
> what messages should really be sent, and when.

I use Spy++ on it... What was the problem?

> Certainly a common
> problem is that a fix in one area exposes a problem elsewhere, and that
> possibly is what happened here.

Probably. I am really intersted in helping track this one down (although I
can work around it in SL and that's what I'll do for the time being ...).

 Cheers,
 Dusan





More information about the wine-devel mailing list