diff --git a/headers/private/interface/ToolTipManager.h b/headers/private/interface/ToolTipManager.h index bfd863fb48..7eca0fc51b 100644 --- a/headers/private/interface/ToolTipManager.h +++ b/headers/private/interface/ToolTipManager.h @@ -18,7 +18,7 @@ class BToolTipManager { public: static BToolTipManager* Manager(); - void ShowTip(BToolTip* tip, BPoint point, + void ShowTip(BToolTip* tip, BPoint where, void* owner); void HideTip(); diff --git a/src/kits/interface/ToolTipManager.cpp b/src/kits/interface/ToolTipManager.cpp index 6a57bfeb28..918ad0ac23 100644 --- a/src/kits/interface/ToolTipManager.cpp +++ b/src/kits/interface/ToolTipManager.cpp @@ -46,6 +46,8 @@ public: void HideTip(); void ShowTip(); + + void ResetWindowFrame(); void ResetWindowFrame(BPoint where); BToolTip* Tip() const { return fToolTip; } @@ -105,10 +107,7 @@ ToolTipView::DetachedFromWindow() void ToolTipView::FrameResized(float width, float height) { - BPoint where; - GetMouse(&where, NULL, false); - - ResetWindowFrame(ConvertToScreen(where)); + ResetWindowFrame(); } @@ -156,6 +155,16 @@ ToolTipView::ShowTip() } +void +ToolTipView::ResetWindowFrame() +{ + BPoint where; + GetMouse(&where, NULL, false); + + ResetWindowFrame(ConvertToScreen(where)); +} + + /*! Tries to find the right frame to show the tool tip in, trying to use the alignment that the tool tip specifies. Makes sure the tool tip can be shown on screen in its entirety, ie. it will @@ -366,7 +375,7 @@ BToolTipManager::Manager() void -BToolTipManager::ShowTip(BToolTip* tip, BPoint point, void* owner) +BToolTipManager::ShowTip(BToolTip* tip, BPoint where, void* owner) { BToolTip* current = NULL; void* currentOwner = NULL; @@ -388,7 +397,7 @@ BToolTipManager::ShowTip(BToolTip* tip, BPoint point, void* owner) fWindow.SendMessage(kMsgHideToolTip); if (tip != NULL) { - BWindow* window = new BPrivate::ToolTipWindow(tip, point, owner); + BWindow* window = new BPrivate::ToolTipWindow(tip, where, owner); window->Show(); fWindow = BMessenger(window);