Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d617c57

Browse files
committed
Changed default background yield time to 1 tick
1 parent b9e5e14 commit d617c57

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

Mac/Python/macglue.c

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ static void PyMac_DoYield Py_PROTO((int));
129129
static long interval_fg = 12;
130130
static long interval_bg = 6;
131131
static long yield_fg = 1;
132-
static long yield_bg = 12;
132+
static long yield_bg = 2;
133133
static long lastyield;
134134
static int in_foreground;
135135

@@ -543,10 +543,23 @@ void
543543
SIOUXDoAboutBox(void)
544544
{
545545
DialogPtr theDialog;
546+
WindowRef theWindow;
547+
CGrafPtr thePort;
546548
short item;
549+
short xpos, ypos, width, height, swidth, sheight;
547550

548551
if( (theDialog = GetNewDialog(ABOUT_ID, NULL, (WindowPtr)-1)) == NULL )
549552
return;
553+
theWindow = GetDialogWindow(theDialog);
554+
thePort = GetWindowPort(theWindow);
555+
width = thePort->portRect.right - thePort->portRect.left;
556+
height = thePort->portRect.bottom - thePort->portRect.top;
557+
swidth = qd.screenBits.bounds.right - qd.screenBits.bounds.left;
558+
sheight = qd.screenBits.bounds.bottom - qd.screenBits.bounds.top - LMGetMBarHeight();
559+
xpos = (swidth-width)/2;
560+
ypos = (sheight-height)/2 + LMGetMBarHeight();
561+
MoveWindow(theWindow, xpos, ypos, 0);
562+
ShowWindow(theWindow);
550563
ModalDialog(NULL, &item);
551564
DisposeDialog(theDialog);
552565
}

0 commit comments

Comments
 (0)