[ tktoolkit-Bugs-684319 ] Incorrect screen positions reported, Aqua

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ tktoolkit-Bugs-684319 ] Incorrect screen positions reported, Aqua

SourceForge.net
Bugs item #684319, was opened at 2003-02-10 17:59
Message generated for change (Comment added) made by hobbs
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112997&aid=684319&group_id=12997

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: 66. Aqua Window Operations
Group: obsolete: 8.4.1
>Status: Pending
>Resolution: Duplicate
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Daniel A. Steffen (das)
Summary: Incorrect screen positions reported, Aqua

Initial Comment:
Screen positions reported by winfo rootx and winfo rooty are
sometimes incorrect in Aqua Tk 8.4.1.  When I bring up a toplevel
Tix window, all other toplevel windows in the application after
being moved report that their rootx, rooty position equals that of
the Tix toplevel.  This situation persists until the Tix toplevel is
unmapped or destroyed.

This problem occurs using a port of the Tix meta-widget package
to Mac Aqua that is not yet distributed so I cannot easily provide
test code to demonstrate the problem.

I have tracked the problem to Tk source code file

     tk8.4.1/macosx/tkMacOSXMouseEvent.c

line 292 in function TkMacOSXProcessMouseEvent():

        case inDrag:
            DragWindow(medPtr->whichWin, where, NULL);
            where2.h = where2.v = 0;
            LocalToGlobal(&where2);
            if (EqualPt(where, where2)) {
                return false;
            }

The LocalToGlobal() call in this code uses the current graphics
port, but the port is not set anywhere nearby above this call.  In
the above incorrect rootx,rooty situation the wrong port is current.  
Adding a SetPortWindowPort() before the LocalToGlobal() call
fixed the problem.

        case inDrag:
            DragWindow(medPtr->whichWin, where, NULL);
            where2.h = where2.v = 0;
SetPortWindowPort(medPtr->whichWin);    /* Added by Tom G to
fix wrong window position bug. */
            LocalToGlobal(&where2);
            if (EqualPt(where, where2)) {
                return false;
            }

I am not familiar enough with the code to know if this is the
correct solution.

Tom Goddard
[hidden email]



----------------------------------------------------------------------

>Comment By: Jeffrey Hobbs (hobbs)
Date: 2005-09-05 15:20

Message:
Logged In: YES
user_id=72656

This is the same as the fix for 1160025, fixed 2005-03-10.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=112997&aid=684319&group_id=12997


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Tcl-Bugs mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/tcl-bugs