summaryrefslogtreecommitdiffstats
path: root/libjava/java/awt/SystemColor.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java/awt/SystemColor.java')
-rw-r--r--libjava/java/awt/SystemColor.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/libjava/java/awt/SystemColor.java b/libjava/java/awt/SystemColor.java
index c6bffe2101a..5217677b722 100644
--- a/libjava/java/awt/SystemColor.java
+++ b/libjava/java/awt/SystemColor.java
@@ -427,7 +427,7 @@ public final class SystemColor extends Color implements Serializable
* as the system color is solid, the context does not need any of the
* passed parameters to do its job.
*
- * @param cm the requested color model, ignored
+ * @param cm the requested color model
* @param deviceBounds the bounding box in device coordinates, ignored
* @param userBounds the bounding box in user coordinates, ignored
* @param xform the bounds transformation, ignored
@@ -441,8 +441,8 @@ public final class SystemColor extends Color implements Serializable
{
Toolkit.getDefaultToolkit().loadSystemColors(colors);
int color = colors[value] | ALPHA_MASK;
- if (context == null || color != context.color)
- context = new ColorPaintContext(color);
+ if (context == null || color != context.color || !context.getColorModel().equals(cm))
+ context = new ColorPaintContext(cm,color);
return context;
}
OpenPOWER on IntegriCloud