Share

Tk Toolkit

Tracker: Bugs

5 Incorrect screen positions reported, Aqua - ID: 684319
Last Update: Comment added ( sf-robot )

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
goddard@cgl.ucsf.edu


Nobody/Anonymous ( nobody ) - 2003-02-11 01:59

5

Closed

Duplicate

Daniel A. Steffen

66. Aqua Window Operations

obsolete: 8.4.1

Public


Comments ( 2 )

Date: 2005-09-20 02:20
Sender: sf-robotSourceForge.net Site Admin

Logged In: YES
user_id=1312539

This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).


Date: 2005-09-05 22:20
Sender: hobbsSourceForge.net SubscriberProject Admin

Logged In: YES
user_id=72656

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


Attached File

No Files Currently Attached

Changes ( 6 )

Field Old Value Date By
status_id Pending 2005-09-20 02:20 sf-robot
close_date 2005-09-05 22:20 2005-09-20 02:20 sf-robot
status_id Open 2005-09-05 22:20 hobbs
resolution_id None 2005-09-05 22:20 hobbs
close_date - 2005-09-05 22:20 hobbs
summary Incorrect screen positions reported, Aqua Tk 8.4.1 2003-10-03 15:12 dgp