summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordas <das>2007-07-02 13:05:13 (GMT)
committerdas <das>2007-07-02 13:05:13 (GMT)
commit76be1c5efbf561516073d13eb7807b7c1f6876c6 (patch)
tree82725789edf0a3a67ec75cf082af8681148438a0
parent62be4daee8881fef41d16c205afb1a81cca2f34e (diff)
downloadtk-76be1c5efbf561516073d13eb7807b7c1f6876c6.zip
tk-76be1c5efbf561516073d13eb7807b7c1f6876c6.tar.gz
tk-76be1c5efbf561516073d13eb7807b7c1f6876c6.tar.bz2
* macosx/tkMacOSXDraw.c (TkMacOSXRestoreDrawingContext): don't restore
port state if it wasn't altered by TkMacOSXSetupDrawingContext().
-rw-r--r--ChangeLog10
-rw-r--r--macosx/tkMacOSXColor.c8
-rw-r--r--macosx/tkMacOSXDraw.c4
3 files changed, 18 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 0a16a05..64349c1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2007-07-02 Daniel Steffen <das@users.sourceforge.net>
+
+ * xlib/xgc.c (XCreateGC): correct black and white pixel values used to
+ initialize GC foregrund and background fields.
+
+ * macosx/tkMacOSXColor.c: add debug messages for unknown pixel values.
+
+ * macosx/tkMacOSXDraw.c (TkMacOSXRestoreDrawingContext): don't restore
+ port state if it wasn't altered by TkMacOSXSetupDrawingContext().
+
2007-06-29 Daniel Steffen <das@users.sourceforge.net>
* xlib/ximage.c: bitmaps created from the static .xbm
diff --git a/macosx/tkMacOSXColor.c b/macosx/tkMacOSXColor.c
index 61403ab..697610d 100644
--- a/macosx/tkMacOSXColor.c
+++ b/macosx/tkMacOSXColor.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXColor.c,v 1.12 2007/06/29 03:20:00 das Exp $
+ * RCS: @(#) $Id: tkMacOSXColor.c,v 1.13 2007/07/02 13:05:14 das Exp $
*/
#include "tkMacOSXPrivate.h"
@@ -300,7 +300,7 @@ TkSetMacColor(
*
* TkMacOSXSetColorInPort --
*
- * Sets fore or back color in the current QD port from an X pixel
+ * Sets fore or back color in the given QD port from an X pixel
* value, and if the pixel code indicates a system color, sets
* the corresponding brush, textColor or background via
* Appearance mgr APIs.
@@ -367,6 +367,8 @@ TkMacOSXSetColorInPort(
if (portChanged) {
QDSwapPort(savePort, NULL);
}
+ } else {
+ TkMacOSXDbgMsg("Ignored unknown pixel value 0x%lx", pixel);
}
if (penPat && !setPenPat) {
GetPortBackPixPat(port, penPat);
@@ -521,6 +523,8 @@ TkMacOSXSetColorInContext(
} else if (((pixel >> 24) & 0xff) == TRANSPARENT_PIXEL) {
CGContextSetRGBFillColor(context, 0.0, 0.0, 0.0, 0.0);
CGContextSetRGBStrokeColor(context, 0.0, 0.0, 0.0, 0.0);
+ } else {
+ TkMacOSXDbgMsg("Ignored unknown pixel value 0x%lx", pixel);
}
}
diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c
index cda02aa..d28033b 100644
--- a/macosx/tkMacOSXDraw.c
+++ b/macosx/tkMacOSXDraw.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXDraw.c,v 1.27 2007/06/29 03:20:01 das Exp $
+ * RCS: @(#) $Id: tkMacOSXDraw.c,v 1.28 2007/07/02 13:05:14 das Exp $
*/
#include "tkMacOSXPrivate.h"
@@ -1630,7 +1630,7 @@ TkMacOSXRestoreDrawingContext(TkMacOSXDrawingContext *dc)
if (dc->port) {
ChkErr(QDEndCGContext, dc->port, &(dc->context));
}
- } else {
+ } else if (dc->port) {
if (!tkPictureIsOpen) {
HidePen();
}