Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonah Graham2021-06-19 14:11:05 +0000
committerJonah Graham2021-06-19 17:16:45 +0000
commit6b332e35cdb05e642af32c9d6151e1488d1da476 (patch)
treed121e15b649a1c9bf50939d6e49a7dc3e54d8192
parenta319ec5c2ead7ed884b3dcf14ce4e111084a740f (diff)
downloadorg.eclipse.cdt-6b332e35cdb05e642af32c9d6151e1488d1da476.tar.gz
org.eclipse.cdt-6b332e35cdb05e642af32c9d6151e1488d1da476.tar.xz
org.eclipse.cdt-6b332e35cdb05e642af32c9d6151e1488d1da476.zip
Bug 574271: Draw characters in the correct color on macos
There is a bug in SWT on macos - Bug 568777 - with the cache of single character drawStrings with transparent backgrounds as a performance boost. This causes the terminal to draw some characters in the wrong color. The workaround is to not draw with transparency, which should be fine because we just filled the background with the same color that the 1 character string will draw with. The performance, measured with TerminalTextUITest in Fast mode with no throttling, does not seem affected and in my testing there does not seem to be any graphic side effects. Change-Id: I1b0aadae100d81a8f4533ba73273ccc8202e068f
-rw-r--r--terminal/plugins/org.eclipse.tm.terminal.control/META-INF/MANIFEST.MF2
-rw-r--r--terminal/plugins/org.eclipse.tm.terminal.control/src/org/eclipse/tm/internal/terminal/textcanvas/TextLineRenderer.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/terminal/plugins/org.eclipse.tm.terminal.control/META-INF/MANIFEST.MF b/terminal/plugins/org.eclipse.tm.terminal.control/META-INF/MANIFEST.MF
index 6689e2ee7a5..94dfcbf3f7a 100644
--- a/terminal/plugins/org.eclipse.tm.terminal.control/META-INF/MANIFEST.MF
+++ b/terminal/plugins/org.eclipse.tm.terminal.control/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.tm.terminal.control; singleton:=true
-Bundle-Version: 5.2.0.qualifier
+Bundle-Version: 5.2.1.qualifier
Bundle-Activator: org.eclipse.tm.internal.terminal.control.impl.TerminalPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/terminal/plugins/org.eclipse.tm.terminal.control/src/org/eclipse/tm/internal/terminal/textcanvas/TextLineRenderer.java b/terminal/plugins/org.eclipse.tm.terminal.control/src/org/eclipse/tm/internal/terminal/textcanvas/TextLineRenderer.java
index ab3d08080e3..845ee499581 100644
--- a/terminal/plugins/org.eclipse.tm.terminal.control/src/org/eclipse/tm/internal/terminal/textcanvas/TextLineRenderer.java
+++ b/terminal/plugins/org.eclipse.tm.terminal.control/src/org/eclipse/tm/internal/terminal/textcanvas/TextLineRenderer.java
@@ -176,7 +176,7 @@ public class TextLineRenderer implements ILinelRenderer {
// TODO why do I have to draw the background character by character??????
gc.fillRectangle(xx, y, fStyleMap.getFontWidth(), fStyleMap.getFontHeight());
if (c != ' ' && c != '\000') {
- gc.drawString(String.valueOf(c), fStyleMap.getCharOffset(c) + xx, y, true);
+ gc.drawString(String.valueOf(c), fStyleMap.getCharOffset(c) + xx, y, false);
}
}
} else {

Back to the top