Open wsu-cb opened 3 weeks ago
I tried to modify the wxTipWindow
implementation to wxEventHandler::Bind()
a wxEVT_MOTION
handler to the constructor's passed-in parent window to work around the problem. However, I discovered that the dialogs
sample actually passes the MyFrame
pointer rather than the MyCanvas
pointer as the wxTipWindow
's parent. Since the MyFrame
is largely covered by the MyCanvas
, the MyFrame
didn't receive any wxEVT_MOTION
events either, so this workaround didn't help at all. Is passing MyCanvas
instead of MyFrame
as the wxTipWindow
parent an additional bug, or is there some need to do that? A quick test of passing MyCanvas
instead of MyFrame
didn't show any problems, and allowed this workaround to succeed.
Description
Bug description:
The
wxTipWindow
is not fully respecting its bounding rectangle.Expected vs observed behaviour:
The
wxTipWindow
constructor has a (optional)rectBounds
argument.Expected: If the mouse leaves the
rectBounds
area, thewxTipWindow
is supposed to close.Observed: If the mouse leaves
rectBounds
but does not enter thewxTipWindow
, thewxTipWindow
does not close.Patch or snippet allowing to reproduce the problem:
wxTipWindow-BoundingRect-bug.patch
To Reproduce:
Steps to reproduce the behaviour
Ctrl+Shift+H
to open thewxTipWindow
rectBounds
to thewxSize(5, 5)
square around the initial cursor position. Move the cursor AWAY from the displayedwxTipWindow
so that it leaves the initialwxSize(5, 5)
square. No matter how far away the mouse is moved from its initial position, thewxTipWindow
stays open.wxTipWindow
. ThewxTipWindow
closes.The problem is that there is a
wxEVT_MOTION
handler in thewxTipWindow
that checks therectBounds
, but if the mouse is not overwxTipWindow
, the handler is never called.Platform and version information