Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#3,319 2 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
48/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
java
Lĩnh vực
desktop

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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".

Ngôn ngữ chính
Java
Star
202
Fork
206
Merge trung bình
14 giờ 7 phút
Pull request đã merge (30 ngày)
103

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của eclipse-platform/eclipse.platform.swt

Tất cả issue của eclipse-platform/eclipse.platform.swt

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.