diff options
author | das <das@noemail.net> | 2007-05-30 06:35:53 (GMT) |
---|---|---|
committer | das <das@noemail.net> | 2007-05-30 06:35:53 (GMT) |
commit | 574cdf1757893e1340374a6a2799652fa1af45bd (patch) | |
tree | d698fa040408e94632aa7a89b0599efb12078dfb /xlib | |
parent | be4ebe5d5ebb14b9e5cc65fd4d5986e018e0d509 (diff) | |
download | tk-574cdf1757893e1340374a6a2799652fa1af45bd.zip tk-574cdf1757893e1340374a6a2799652fa1af45bd.tar.gz tk-574cdf1757893e1340374a6a2799652fa1af45bd.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.
FossilOrigin-Name: c7c63baa4ef02185528b36421dc2d0153822a46f
Diffstat (limited to 'xlib')
-rw-r--r-- | xlib/xgc.c | 31 |
1 files changed, 19 insertions, 12 deletions
@@ -9,19 +9,19 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: xgc.c,v 1.11 2007/01/03 08:22:08 das Exp $ + * RCS: @(#) $Id: xgc.c,v 1.12 2007/05/30 06:35:55 das Exp $ */ #include <tkInt.h> #if !defined(MAC_OSX_TK) -# include <X11/Xlib.h> +# include <X11/Xlib.h> #endif #ifdef MAC_OSX_TK -# include <X11/Xlib.h> -# include <X11/X.h> -# define Cursor XCursor -# define Region XRegion +# include <X11/Xlib.h> +# include <X11/X.h> +# define Cursor XCursor +# define Region XRegion #endif /* @@ -342,8 +342,9 @@ XSetClipOrigin( * Sets the clipping region/pixmap for a GC. * * Note that unlike the Xlib equivalent, it is not safe to delete the - * region after setting it into the GC. The only use of TkSetRegion is - * currently in ImgPhotoDisplay, which uses the GC immediately. + * region after setting it into the GC. The only uses of TkSetRegion + * are currently in DisplayFrame and in ImgPhotoDisplay, which use the + * GC immediately. * * Results: * None. @@ -360,6 +361,8 @@ TkSetRegion( GC gc, TkRegion r) { + TkpClipMask *clip_mask; + if (r == None) { if (gc->clip_mask) { ckfree((char*) gc->clip_mask); @@ -371,8 +374,9 @@ TkSetRegion( if (gc->clip_mask == None) { gc->clip_mask = (Pixmap)ckalloc(sizeof(TkpClipMask)); } - ((TkpClipMask*) gc->clip_mask)->type = TKP_CLIP_REGION; - ((TkpClipMask*) gc->clip_mask)->value.region = r; + clip_mask = (TkpClipMask*) gc->clip_mask; + clip_mask->type = TKP_CLIP_REGION; + clip_mask->value.region = r; } void @@ -381,6 +385,8 @@ XSetClipMask( GC gc, Pixmap pixmap) { + TkpClipMask *clip_mask; + if (pixmap == None) { if (gc->clip_mask) { ckfree((char*) gc->clip_mask); @@ -392,8 +398,9 @@ XSetClipMask( if (gc->clip_mask == None) { gc->clip_mask = (Pixmap)ckalloc(sizeof(TkpClipMask)); } - ((TkpClipMask*) gc->clip_mask)->type = TKP_CLIP_PIXMAP; - ((TkpClipMask*) gc->clip_mask)->value.pixmap = pixmap; + clip_mask = (TkpClipMask*) gc->clip_mask; + clip_mask->type = TKP_CLIP_PIXMAP; + clip_mask->value.pixmap = pixmap; } /* |