summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXMenu.c
diff options
context:
space:
mode:
authordas <das>2007-05-30 06:39:37 (GMT)
committerdas <das>2007-05-30 06:39:37 (GMT)
commit354d7ea3b9178402bf28ae063c5e62f647f7d087 (patch)
treebbd79c7a2b425288ac6c592cd05b8613c3dbdfd7 /macosx/tkMacOSXMenu.c
parent48d6dbc41b0b9cd9e07d7ad699bd0e90a90424c7 (diff)
downloadtk-354d7ea3b9178402bf28ae063c5e62f647f7d087.zip
tk-354d7ea3b9178402bf28ae063c5e62f647f7d087.tar.gz
tk-354d7ea3b9178402bf28ae063c5e62f647f7d087.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:
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 9c79ffc..5728d9e 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.6.2.24 2007/04/29 02:26:49 das Exp $
+ * RCS: @(#) $Id: tkMacOSXMenu.c,v 1.6.2.25 2007/05/30 06:39:38 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