comctl32: Update the tooltip rectangle when a tool button is hidden

Eric Kohl eric.kohl at t-online.de
Mon Feb 20 17:19:24 CST 2017


On 20.02.2017 20:24 Nikolay wrote:
> 
> Hi, Eric.
> 
> What are symptoms of that? I'd guess it's causing tooltips to appear
> when they shouldn't, or tooltips from one button to appear for another.
> 
> Do you have an demo application for that or any easy way to reproduce?
> 
> 
Hi, Nikolay!

One symptom is that tooltips appear on the wrong button. When you hide a
button from the toolbar, the next button appears in the same location as
the now hidden button but it does not show its own tooltip but the
tooltip of the hidden button.

Unfortunately I do not know of a simple way to reproduce this in Wine,
but it is pretty obvious when you look at the TOOLBAR_LayoutToolbar()
function: TOOLBAR_TooltipSetRect() is called for all visible buttons
after their proper location has been calculated. The call to
TOOLBAR_TooltipSetRect() updates the position and size of the tooltip.
But the tooltip rectangle is not updated for hidden toolbar buttons. The
patch fixes this issue.

I have seen this bug in the new ReactOS device manager, that shows and
hides toolbar buttons depending on the selected treeview item (root,
class or device item). When you select a device item first and select a
class or root item next, some buttons are hidden. The single remaining
button shows the wrong tooltip because it is actually the tooltip of one
of the hidden buttons.

I already fixed this in the ReactOS source tree. You need to get a
revision before r73853 to see this bug.

Regards
Eric




More information about the wine-devel mailing list