summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXMenu.c
diff options
context:
space:
mode:
authordas <das>2007-05-30 06:35:54 (GMT)
committerdas <das>2007-05-30 06:35:54 (GMT)
commite37ef892e06f50859941c35f85b7f07ce98d756e (patch)
treed698fa040408e94632aa7a89b0599efb12078dfb /macosx/tkMacOSXMenu.c
parenteea3d8a589c007592691cf767336a06b0f600c50 (diff)
downloadtk-e37ef892e06f50859941c35f85b7f07ce98d756e.zip
tk-e37ef892e06f50859941c35f85b7f07ce98d756e.tar.gz
tk-e37ef892e06f50859941c35f85b7f07ce98d756e.tar.bz2
* macosx/tkMacOSXMenu.c (DrawMenuSeparator): use DrawingContext API.
* macosx/tkMacOSXWindowEvent.c (ClearPort): clip to updateRgn. * macosx/tkMacOSXDebug.c: factor out debug region flashing. * macosx/tkMacOSXDebug.h: * macosx/tkMacOSXDraw.c: * macosx/tkMacOSXSubwindows.c: * macosx/tkMacOSXWindowEvent.c: * macosx/tkMacOSXEvent.c: cleanup whitespace and formatting. * macosx/tkMacOSXFont.c: * macosx/tkMacOSXRegion.c: * macosx/tkMacOSXSubwindows.c: * macosx/tkMacOSXWindowEvent.c: * macosx/tkMacOSXWm.c: * macosx/tkMacOSXXStubs.c: * xlib/xgc.c: * macosx/Wish.xcodeproj/project.pbxproj: delete references to removed * macosx/Wish.xcodeproj/default.pbxuser: ttk files.
Diffstat (limited to 'macosx/tkMacOSXMenu.c')
-rw-r--r--macosx/tkMacOSXMenu.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c
index 46cdf5d..da7ce64 100644
--- a/macosx/tkMacOSXMenu.c
+++ b/macosx/tkMacOSXMenu.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXMenu.c,v 1.37 2007/04/23 21:24:33 das Exp $
+ * RCS: @(#) $Id: tkMacOSXMenu.c,v 1.38 2007/05/30 06:35:55 das Exp $
*/
#include "tkMacOSXInt.h"
@@ -2699,21 +2699,16 @@ DrawMenuSeparator(
int width, /* width of entry */
int height) /* height of entry */
{
- CGrafPtr destPort, savePort;
- Boolean portChanged;
+ TkMacOSXDrawingContext dc;
Rect r;
- destPort = TkMacOSXGetDrawablePort(d);
- portChanged = QDSwapPort(destPort, &savePort);
- TkMacOSXSetUpClippingRgn(d);
r.top = y;
r.left = x;
r.bottom = y + height;
r.right = x + width;
- DrawThemeMenuSeparator(&r);
- if (portChanged) {
- QDSwapPort(savePort, NULL);
- }
+ TkMacOSXSetupDrawingContext(d, gc, 1, &dc);
+ ChkErr(DrawThemeMenuSeparator, &r);
+ TkMacOSXRestoreDrawingContext(&dc);
}
#ifdef USE_TK_MDEF