toolbar.c problem (ATTN: Duane)

Dusan Vujosevic dusanv at cadlink.com
Wed Apr 17 22:40:34 CDT 2002


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.

If other apps are were having problems with 1.106 (Duane was mentioning Acrobat Reader - I will test that..) I suggest that the problem might be elsewhere.

Should I supply a patch?

Cheers,
Dusan



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winehq.org/pipermail/wine-devel/attachments/20020417/9f8a8734/attachment.htm


More information about the wine-devel mailing list