summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXButton.c
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/tkMacOSXButton.c')
-rw-r--r--macosx/tkMacOSXButton.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/macosx/tkMacOSXButton.c b/macosx/tkMacOSXButton.c
index 76906e7..edd641a 100644
--- a/macosx/tkMacOSXButton.c
+++ b/macosx/tkMacOSXButton.c
@@ -11,10 +11,10 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXButton.c,v 1.2.2.17 2007/05/31 13:42:11 das Exp $
+ * RCS: @(#) $Id: tkMacOSXButton.c,v 1.2.2.18 2007/06/29 03:22:00 das Exp $
*/
-#include "tkMacOSXInt.h"
+#include "tkMacOSXPrivate.h"
#include "tkButton.h"
#include "tkMacOSXFont.h"
#include "tkMacOSXDebug.h"
@@ -789,8 +789,7 @@ TkMacOSXInitControl(
SInt32 controlReference;
rootControl = TkMacOSXGetRootControl(Tk_WindowId(butPtr->tkwin));
- mbPtr->windowRef = GetWindowFromPort(
- TkMacOSXGetDrawablePort(Tk_WindowId(butPtr->tkwin)));
+ mbPtr->windowRef = TkMacOSXDrawableWindow(Tk_WindowId(butPtr->tkwin));
/*
* Set up the user pane.
@@ -1238,9 +1237,11 @@ UserPaneDraw(
{
MacButton *mbPtr = (MacButton *)(intptr_t)GetControlReference(control);
Rect contrlRect;
-
+ CGrafPtr port;
+
+ GetPort(&port);
GetControlBounds(control,&contrlRect);
- TkMacOSXSetColorInPort(mbPtr->userPaneBackground, 0, NULL);
+ TkMacOSXSetColorInPort(mbPtr->userPaneBackground, 0, NULL, port);
EraseRect(&contrlRect);
}
@@ -1269,7 +1270,10 @@ UserPaneBackgroundProc(
MacButton * mbPtr = (MacButton *)(intptr_t)GetControlReference(control);
if (info->colorDevice) {
- TkMacOSXSetColorInPort(mbPtr->userPaneBackground, 0, NULL);
+ CGrafPtr port;
+
+ GetPort(&port);
+ TkMacOSXSetColorInPort(mbPtr->userPaneBackground, 0, NULL, port);
}
}