Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

[Linux] [MacOS] CTabFolder renders tabs with a delay

Abierto
#3,319 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
java
Área
desktop

Línea de trabajo

Start with the test_tabsAreRendered reproduction linked from PR #3295 and run it on the affected Linux or macOS x86_64 setup. Then trace how CTabFolder renders and updates tabs on those platforms, comparing with the working platforms. Done means the test passes for all parameters and both tabs render and disappear as asserted.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

CTabFolder does not render tabs in a timely manner on Linux and MaxOS x86_64. The problem is not observed on Windows and MacOS aarch64.

Test steps

Execute following test from https://github.com/eclipse-platform/eclipse.platform.swt/pull/3295

@ParameterizedTest
@CsvSource(value = {"false,0", "false,1", "true,0", "true,1"})
public void test_tabsAreRendered(boolean nestComposite, int activateTab) {
	Composite parent = shell;
	Control[] children = shell.getChildren();
	for (Control child : children) {
		child.dispose();
	}
	if (nestComposite) {
		parent = new Composite(parent, SWT.NONE);
		parent.setLayout(new FillLayout());
	}
	ctabFolder = new CTabFolder(parent, SWT.NONE);
	setWidget(ctabFolder);
	shell.setSize(800, 400);
	ctabFolder.setBackground(RED);
	ctabFolder.setForeground(BLUE);
	ctabFolder.setSelectionForeground(BLUE);
	CTabItem tab = createTabItem(1);
	openShell(shell);
	processEvents();
	Rectangle bounds = tab.getBounds();
	assertTrue(hasPixel(ctabFolder, BLUE, bounds));
	tab = createTabItem(2);
	ctabFolder.setSelection(activateTab);
	SwtTestUtil.processEvents();
	bounds = tab.getBounds();
	assertTrue(hasPixel(ctabFolder, BLUE, bounds)); // reference 1
	tab.dispose();
	SwtTestUtil.processEvents();
	assertFalse(hasPixel(ctabFolder, BLUE, bounds)); // reference 2
}

private CTabItem createTabItem(int i) {
	CTabItem item = new CTabItem(ctabFolder, SWT.CLOSE);
	item.setText("█".repeat(10));
	Label content = new Label(ctabFolder, SWT.NONE);
	content.setText("Content " + i);
	item.setControl(content);
	return item;
}

The test creates two tabs, activates one of them and ensures that tab text is rendered. The test always fails for any parameter.

A characteristic screenshot captured from CI environment for GTK3, x86_64, x11:

Image

Instead of expected two tabs, only one is shown. This happens for all parameters but the last one failing test on line "reference 1".

Lenguaje dominante
Java
Estrellas
202
Forks
206
Merge medio
16 h 56 min
PR fusionados (30 d)
110

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de eclipse-platform/eclipse.platform.swt

Todos los issues de eclipse-platform/eclipse.platform.swt

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.