From aca77441ff7f852ddbf7896dd49cfc41a90e4b05 Mon Sep 17 00:00:00 2001 From: das Date: Sat, 13 Nov 2004 03:42:10 +0000 Subject: * macosx/tkMacOSXXStubs.c: implemented XGetGeometry(). --- ChangeLog | 4 ++++ macosx/tkMacOSXXStubs.c | 28 ++++++++++++++++++++++++---- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9c78fea..2ba95f9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2004-11-12 Daniel Steffen + + * macosx/tkMacOSXXStubs.c: implemented XGetGeometry(). + 2004-11-12 Jeff Hobbs * generic/tkCmds.c (Tk_TkObjCmd): use correct screen data when diff --git a/macosx/tkMacOSXXStubs.c b/macosx/tkMacOSXXStubs.c index 4d83c7b..5e913d1 100644 --- a/macosx/tkMacOSXXStubs.c +++ b/macosx/tkMacOSXXStubs.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXXStubs.c,v 1.2.2.3 2004/05/03 22:23:09 hobbs Exp $ + * RCS: @(#) $Id: tkMacOSXXStubs.c,v 1.2.2.4 2004/11/13 03:42:10 das Exp $ */ #include "tkInt.h" @@ -419,9 +419,29 @@ XGetGeometry(display, d, root_return, x_return, y_return, width_return, unsigned int* border_width_return; unsigned int* depth_return; { - /* Used in tkCanvPs.c & wm code */ - Debugger(); - return 0; + TkWindow *winPtr = ((MacDrawable *) d)->winPtr; + + display->request++; + *root_return = ROOT_ID; + if (winPtr) { + *x_return = Tk_X(winPtr); + *y_return = Tk_Y(winPtr); + *width_return = Tk_Width(winPtr); + *height_return = Tk_Height(winPtr); + *border_width_return = winPtr->changes.border_width; + *depth_return = Tk_Depth(winPtr); + } else { + Rect boundsRect; + CGrafPtr destPort = TkMacOSXGetDrawablePort(d); + GetPortBounds(destPort,&boundsRect); + *x_return = boundsRect.left; + *y_return = boundsRect.top; + *width_return = boundsRect.right - boundsRect.left; + *height_return = boundsRect.bottom - boundsRect.top; + *border_width_return = 0; + *depth_return = 32; + } + return 1; } void -- cgit v0.12