summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXScale.c
diff options
context:
space:
mode:
authordas <das>2006-04-28 06:02:57 (GMT)
committerdas <das>2006-04-28 06:02:57 (GMT)
commit7082b71f45c55fa8460b37254ca0b47f42c2adf1 (patch)
tree5b3992c68a12ca95ff81a211d111286d7c82c2e0 /macosx/tkMacOSXScale.c
parentfb1dd7d7db4f17aa2f7d203c90974bc6b0b983e0 (diff)
downloadtk-7082b71f45c55fa8460b37254ca0b47f42c2adf1.zip
tk-7082b71f45c55fa8460b37254ca0b47f42c2adf1.tar.gz
tk-7082b71f45c55fa8460b37254ca0b47f42c2adf1.tar.bz2
* macosx/tkMacOSXWm.c (TkWmMapWindow, InitialWindowBounds): fix use of
potentially stale window position in initial configure event on first map of a window. [Bug 1476443] (TkMacOSXWindowOffset): use modern GetWindowStructureWidths API. * macosx/tkMacOSXInt.h: * macosx/tkMacOSXMouseEvent.c (TkGenerateButtonEventForXPointer): new internal function to generate button events for current pointer directly, without requiring prior call to XQueryPointer(). * macosx/tkMacOSXMouseEvent.c (XQueryPointer): implement return of window-local pointer position. * macosx/tkMacOSXInt.h: use improvements above to avoid calls to * macosx/tkMacOSXKeyEvent.c: GlobalToLocal() when the current port might * macosx/tkMacOSXMenu.c: not be set correctly. May fix [Bug 1243318] * macosx/tkMacOSXMenus.c: * macosx/tkMacOSXScale.c: * macosx/tkMacOSXScrlbr.c: * tkAboutDlg.r: update copyright. * macosx/tkMacOSXCarbonEvents.c: sync with HEAD * macosx/tkMacOSXDebug.c: * macosx/tkMacOSXDebug.h: * macosx/tkMacOSXDraw.c: * macosx/tkMacOSXEvent.c: * macosx/tkMacOSXEvent.h: * macosx/tkMacOSXFont.h: * macosx/tkMacOSXInit.c: * macosx/tkMacOSXInt.h: * macosx/tkMacOSXKeyEvent.c: * macosx/tkMacOSXMenu.c: * macosx/tkMacOSXMenubutton.c: * macosx/tkMacOSXMouseEvent.c: * macosx/tkMacOSXSend.c: * macosx/tkMacOSXTest.c: * macosx/tkMacOSXWindowEvent.c: * macosx/tkMacOSXWm.c:
Diffstat (limited to 'macosx/tkMacOSXScale.c')
-rw-r--r--macosx/tkMacOSXScale.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/macosx/tkMacOSXScale.c b/macosx/tkMacOSXScale.c
index 5c32969..a94b499 100644
--- a/macosx/tkMacOSXScale.c
+++ b/macosx/tkMacOSXScale.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXScale.c,v 1.2.2.4 2006/03/28 02:44:14 das Exp $
+ * RCS: @(#) $Id: tkMacOSXScale.c,v 1.2.2.5 2006/04/28 06:03:00 das Exp $
*/
#include "tkMacOSXInt.h"
@@ -395,12 +395,10 @@ MacScaleEventProc(clientData, eventPtr)
MacScale *macScalePtr = (MacScale *) clientData;
Point where;
Rect bounds;
- int part, x, y, dummy;
- unsigned int state;
+ int part;
CGrafPtr saveWorld;
GDHandle saveDevice;
GWorldPtr destPort;
- Window dummyWin;
#ifdef TK_MAC_DEBUG
fprintf(stderr,"MacScaleEventProc\n" );
@@ -438,9 +436,7 @@ MacScaleEventProc(clientData, eventPtr)
* The TrackControl call will "eat" the ButtonUp event. We now
* generate a ButtonUp event so Tk will unset implicit grabs etc.
*/
- XQueryPointer(NULL, None, &dummyWin, &dummyWin, &x,
- &y, &dummy, &dummy, &state);
- TkGenerateButtonEvent(x, y, Tk_WindowId(macScalePtr->info.tkwin), state);
+ TkGenerateButtonEventForXPointer(Tk_WindowId(macScalePtr->info.tkwin));
SetGWorld(saveWorld, saveDevice);
}