[Linux] [MacOS] CTabFolder renders tabs with a delay
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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:
Instead of expected two tabs, only one is shown. This happens for all parameters but the last one failing test on line "reference 1".
- 主要语言
- Java
- 星标
- 202
- 派生
- 206
- 平均合并
- 16 小时 56 分钟
- 30 天内合并 PR
- 110
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
eclipse-platform/eclipse.platform.swt 的其他 Issue
-
`SWT_AWT.initFrame` takes `(long, String)` in Java; the GTK native declares no `className` and the Cocoa native types it `const char *`可能已有人在做 @GreenFuze 于 2 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 88/100
eclipse-platform/eclipse.platform.swt#3665 · 3 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
eclipse-platform/eclipse.platform.swt#3546 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
eclipse-platform/eclipse.platform.swt#3428 ·
维护者通常 1 天内回复
-
难度 1/5 1-3 小时 新手友好度 75/100
eclipse-platform/eclipse.platform.swt#3336 · 3 条评论 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 30/100
eclipse-platform/eclipse.platform.swt#3718 ·
维护者通常 1 天内回复
查看 eclipse-platform/eclipse.platform.swt 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
bug new windows
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
GantMan/jail-monkey#380 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
objectionary/jucs#145 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
objectionary/lints#1559 ·
维护者通常 2 天内回复