Opened 4 months ago

Closed 4 months ago

#16265 closed defect (fixed)

Tooltip stays visible when app window is hidden.

Reported by: troelsk Owned by: VZ
Priority: low Milestone:
Component: wxMSW Version: dev-latest
Keywords: wxToolTip Cc:
Blocked By: Blocking:
Patch: yes

Description

Patch: Fix it for the main app window, in wxTopLevelWindowMSW::DoShowWindow.
(Maybe this should be done in wxWindowMSW::Show too)

Attachments (8)

hide-tooltip.patch download (1.3 KB) - added by troelsk 4 months ago.
Patch
hide-tooltip(1).patch download (1.3 KB) - added by troelsk 4 months ago.
minimal sample demo
tooltip-minimal.patch download (1.9 KB) - added by troelsk 4 months ago.
minimal sample demo
hide-tooltip.2.patch download (1.4 KB) - added by troelsk 4 months ago.
Improved patch
hide-tooltip.3.patch download (1.5 KB) - added by troelsk 4 months ago.
SW_MINIMIZE too
tooltip-minimal.2.patch download (2.0 KB) - added by troelsk 4 months ago.
Iconize() + Restore() example
hide-tooltip.4.patch download (2.0 KB) - added by troelsk 4 months ago.
TTM_GETCURRENTTOOL
hide-tooltip-ifdef.patch download (450 bytes) - added by vid 4 months ago.
Only hide tooltips if they are enabled in setup.h.

Download all attachments as: .zip

Change History (18)

Changed 4 months ago by troelsk

Patch

Changed 4 months ago by troelsk

minimal sample demo

Changed 4 months ago by troelsk

minimal sample demo

Changed 4 months ago by troelsk

Improved patch

comment:1 Changed 4 months ago by vadz

If we hide the tooltip when we hide the TLW, shouldn't we also hide it when minimizing the TLW (i.e. SW_MINIMIZE)?

comment:2 Changed 4 months ago by troelsk

Indeed. Patch and example updated.

Changed 4 months ago by troelsk

SW_MINIMIZE too

Changed 4 months ago by troelsk

Iconize() + Restore() example

comment:3 Changed 4 months ago by vadz

  • Priority changed from normal to low
  • Status changed from new to confirmed

Sorry, I was on the point of applying this but thought of something else: what if there is more than one TLW? We shouldn't hide all the tooltips if just one of them is hidden... I'm not sure what should we do exactly however.

Maybe there is some way to refresh all the tooltips to hide them if the window they're associated with is not visible any more? Because I think the real problem in your example is that we don't reenter the even loop immediately and so this refresh doesn't happen automatically. It looks like we need to force it somehow.

Changed 4 months ago by troelsk

TTM_GETCURRENTTOOL

comment:4 Changed 4 months ago by troelsk

Right. New patch taking multiple TLW's into account, utilizing TTM_GETCURRENTTOOL. Somewhat quirky this, solving just this fringe (but real to me) problem.

comment:5 Changed 4 months ago by VZ

  • Owner set to VZ
  • Resolution set to fixed
  • Status changed from confirmed to closed

In 76657:

Hide tooltip when its associated window is hidden in wxMSW.

Don't leave the tooltip shown on screen if the window it was shown for was
hidden or iconized (without moving the mouse, as that would have dismissed the
tooltip as well).

Closes #16265.

comment:6 Changed 4 months ago by VZ

In 76662:

Compilation fix to wxMSW tooltip code when not using PCH.

Include the required header when not using PCH.

See #16265.

comment:7 Changed 4 months ago by VZ

In 76663:

Including missing header for wxUniv/MSW build.

Compilation fix after the changes of r76657, see #16265.

comment:8 Changed 4 months ago by vid

  • Resolution fixed deleted
  • Status changed from closed to reopened

Changed 4 months ago by vid

Only hide tooltips if they are enabled in setup.h.

comment:9 Changed 4 months ago by VZ

In 76667:

Compilation fix for wxMSW with wxUSE_TOOLTIPS==0.

This is another fix after the changes of r76657, see #16265.

comment:10 Changed 4 months ago by vadz

  • Resolution set to fixed
  • Status changed from reopened to closed

Thanks!

Note: See TracTickets for help on using tickets.