Fixed problem with 'stuck' informational popups (e.g. ToolTip)

git-svn-id: svn://ultimatepp.org/upp/trunk@538 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2008-10-17 09:08:44 +00:00
parent c085a80750
commit a6962145e8
3 changed files with 5 additions and 1 deletions

View file

@ -2,7 +2,7 @@
NAMESPACE_UPP
#define LLOG(x) // LOG(x)
#define LLOG(x) // DLOG(x)
Ptr<Ctrl> Ctrl::eventCtrl;
Ptr<Ctrl> Ctrl::mouseCtrl;

View file

@ -422,6 +422,8 @@ void Ctrl::Create(Ctrl *owner, bool redirect, bool savebits)
XChangeProperty(Xdisplay, w, XAtom("XdndAware"), XA_ATOM, 32,
0, (byte *)&version, 1);
CancelMode();
if(r.Contains(GetMousePos()))
DispatchMouse(MOUSEMOVE, GetMousePos() - r.TopLeft());
}
void Ctrl::WndDestroy()

View file

@ -468,6 +468,7 @@ void DisplayPopup::MouseWheel(Point p, int zdelta, dword flags)
void DisplayPopup::MouseLeave()
{
DLOG("DisplayPopup::MouseLeave");
Cancel();
}
@ -513,6 +514,7 @@ void DisplayPopup::Sync()
SetRect(r);
if(!IsOpen())
Ctrl::PopUp(ctrl, true, false, false);
DLOG("Open!");
return;
}
}