@@ -1860,12 +1860,13 @@ Exec_stat MCStack::openrect(const MCRectangle &rel, Window_mode wm, MCStack *par
18601860 MCscreen->querymouse (trect.x , trect.y );
18611861 else
18621862 {
1863- /* OVERHAUL - REVISIT [[ FullscreenMode ]] */
18641863 // WEBREV
1865- MCRectangle srect = MCmousestackptr->getrect ();
1866- trect.x = MCmousex + srect.x ;
1867- trect.y = MCmousey + srect.y
1868- - MCmousestackptr->getscroll ();
1864+ // IM-2013-10-09: [[ FullscreenMode ]] Reimplement using MCStack::stacktogloballoc
1865+ MCPoint t_globalloc;
1866+ t_globalloc = MCmousestackptr->stacktogloballoc (MCPointMake (MCmousex, MCmousey));
1867+
1868+ trect.x = t_globalloc.x ;
1869+ trect.y = t_globalloc.y ;
18691870 }
18701871 trect.width = trect.height = 1 ;
18711872 positionrel (trect, OP_ALIGN_LEFT , OP_ALIGN_TOP );
@@ -2692,3 +2693,33 @@ MCPoint MCStack::stacktowindowloc(const MCPoint &p_stackloc) const
26922693}
26932694
26942695// //////////////////////////////////////////////////////////////////////////////
2696+
2697+ MCPoint MCStack::globaltostackloc (const MCPoint &p_windowloc) const
2698+ {
2699+ MCPoint t_loc;
2700+ t_loc = p_windowloc;
2701+
2702+ MCRectangle t_view_rect;
2703+ t_view_rect = view_getrect ();
2704+
2705+ t_loc.x -= t_view_rect.x ;
2706+ t_loc.y -= t_view_rect.y ;
2707+
2708+ return windowtostackloc (t_loc);
2709+ }
2710+
2711+ MCPoint MCStack::stacktogloballoc (const MCPoint &p_stackloc) const
2712+ {
2713+ MCPoint t_loc;
2714+ t_loc = stacktowindowloc (p_stackloc);
2715+
2716+ MCRectangle t_view_rect;
2717+ t_view_rect = view_getrect ();
2718+
2719+ t_loc.x += t_view_rect.x ;
2720+ t_loc.y += t_view_rect.y ;
2721+
2722+ return t_loc;
2723+ }
2724+
2725+ // //////////////////////////////////////////////////////////////////////////////
0 commit comments