@@ -547,7 +547,9 @@ long CMUSHclientDoc::WindowAddHotspot(LPCTSTR Name,
547
547
if (m_CurrentPlugin)
548
548
sPluginID = m_CurrentPlugin->m_strID ;
549
549
550
- return it->second ->AddHotspot (this ,
550
+ long status;
551
+
552
+ status = it->second ->AddHotspot (this ,
551
553
HotspotId,
552
554
sPluginID ,
553
555
Left, Top, Right, Bottom,
@@ -559,6 +561,31 @@ long CMUSHclientDoc::WindowAddHotspot(LPCTSTR Name,
559
561
TooltipText,
560
562
Cursor,
561
563
Flags);
564
+
565
+ // in mouse was over hotspot when it was created, do a "mouse move" to detect this
566
+ if (status == eOK)
567
+ {
568
+ MiniWindowMapIterator it = m_MiniWindows.find (Name);
569
+ if (it != m_MiniWindows.end ())
570
+ {
571
+ CMiniWindow * mw = it->second ;
572
+
573
+ for (POSITION pos=GetFirstViewPosition ();pos!=NULL ;)
574
+ {
575
+ CView* pView = GetNextView (pos);
576
+
577
+ if (pView->IsKindOf (RUNTIME_CLASS (CMUSHView)))
578
+ {
579
+ CMUSHView* pmyView = (CMUSHView*)pView;
580
+ pmyView->Mouse_Move_MiniWindow (this ,
581
+ CPoint (mw->m_last_mouseposition .x + mw->m_rect .left , mw->m_last_mouseposition .y + mw->m_rect .top ) );
582
+ }
583
+ } // end of looping through views
584
+ } // end of miniwindow still exists
585
+ } // end of added hotspot OK
586
+
587
+ return status;
588
+
562
589
} // end of CMUSHclientDoc::WindowHotspot
563
590
564
591
// remove a previously-installed hotspot
0 commit comments