summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXXStubs.c
diff options
context:
space:
mode:
authordas <das>2004-11-13 03:42:10 (GMT)
committerdas <das>2004-11-13 03:42:10 (GMT)
commitaca77441ff7f852ddbf7896dd49cfc41a90e4b05 (patch)
tree7b9efe17b7a1f99b4e38d656988156268eabac92 /macosx/tkMacOSXXStubs.c
parentf7ef97c981ab1aaf7b30223f9f9722bf010d502c (diff)
downloadtk-aca77441ff7f852ddbf7896dd49cfc41a90e4b05.zip
tk-aca77441ff7f852ddbf7896dd49cfc41a90e4b05.tar.gz
tk-aca77441ff7f852ddbf7896dd49cfc41a90e4b05.tar.bz2
* macosx/tkMacOSXXStubs.c: implemented XGetGeometry().
Diffstat (limited to 'macosx/tkMacOSXXStubs.c')
-rw-r--r--macosx/tkMacOSXXStubs.c28
1 files changed, 24 insertions, 4 deletions
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