diff Mac/Python/macglue.c @ 4325:12c3865aeaa0 legacy-trunk

Changed default background yield time to 1 tick
author Jack Jansen <jack.jansen@cwi.nl>
date Sun, 22 Sep 1996 22:14:30 +0000
parents 6c86d9136c09
children a240be5be6b4
line wrap: on
line diff
--- a/Mac/Python/macglue.c	Fri Sep 20 15:30:52 1996 +0000
+++ b/Mac/Python/macglue.c	Sun Sep 22 22:14:30 1996 +0000
@@ -129,7 +129,7 @@
 static long interval_fg = 12;
 static long interval_bg = 6;
 static long yield_fg = 1;
-static long yield_bg = 12;
+static long yield_bg = 2;
 static long lastyield;
 static int in_foreground;
 
@@ -543,10 +543,23 @@
 SIOUXDoAboutBox(void)
 {
 	DialogPtr theDialog;
+	WindowRef theWindow;
+	CGrafPtr thePort;
 	short item;
+	short xpos, ypos, width, height, swidth, sheight;
 	
 	if( (theDialog = GetNewDialog(ABOUT_ID, NULL, (WindowPtr)-1)) == NULL )
 		return;
+	theWindow = GetDialogWindow(theDialog);
+	thePort = GetWindowPort(theWindow);
+	width = thePort->portRect.right - thePort->portRect.left;
+	height = thePort->portRect.bottom - thePort->portRect.top;
+	swidth = qd.screenBits.bounds.right - qd.screenBits.bounds.left;
+	sheight = qd.screenBits.bounds.bottom - qd.screenBits.bounds.top - LMGetMBarHeight();
+	xpos = (swidth-width)/2;
+	ypos = (sheight-height)/2 + LMGetMBarHeight();
+	MoveWindow(theWindow, xpos, ypos, 0);
+	ShowWindow(theWindow);
 	ModalDialog(NULL, &item);
 	DisposeDialog(theDialog);
 }