Skip to content

Commit b5a38e3

Browse files
committed
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
1 parent b9694e5 commit b5a38e3

File tree

1 file changed

+1
-1
lines changed
  • terminal/plugins/org.eclipse.tm.terminal.control/src/org/eclipse/tm/internal/terminal/textcanvas

1 file changed

+1
-1
lines changed

terminal/plugins/org.eclipse.tm.terminal.control/src/org/eclipse/tm/internal/terminal/textcanvas/TextLineRenderer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ private void drawText(GC gc, int x, int y, int colFirst, int col, String text) {
176176
// TODO why do I have to draw the background character by character??????
177177
gc.fillRectangle(xx, y, fStyleMap.getFontWidth(), fStyleMap.getFontHeight());
178178
if (c != ' ' && c != '\000') {
179-
gc.drawString(String.valueOf(c), fStyleMap.getCharOffset(c) + xx, y, true);
179+
gc.drawString(String.valueOf(c), fStyleMap.getCharOffset(c) + xx, y, false);
180180
}
181181
}
182182
} else {

0 commit comments

Comments
 (0)