diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 1996-09-22 22:14:30 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 1996-09-22 22:14:30 (GMT) |
commit | d617c57dce0db9a742cd342bff9bea2a5aa80071 (patch) | |
tree | 586b30add2251e0294854fe5f774cd470ec7076d /Mac/Python | |
parent | b9e5e1415830557ee09c5cb7190ab785b76bc6dc (diff) | |
download | cpython-d617c57dce0db9a742cd342bff9bea2a5aa80071.zip cpython-d617c57dce0db9a742cd342bff9bea2a5aa80071.tar.gz cpython-d617c57dce0db9a742cd342bff9bea2a5aa80071.tar.bz2 |
Changed default background yield time to 1 tick
Diffstat (limited to 'Mac/Python')
-rw-r--r-- | Mac/Python/macglue.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/Mac/Python/macglue.c b/Mac/Python/macglue.c index 3df1a8a..df646ea 100644 --- a/Mac/Python/macglue.c +++ b/Mac/Python/macglue.c @@ -129,7 +129,7 @@ static void PyMac_DoYield Py_PROTO((int)); 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 @@ void 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); } |