-
Notifications
You must be signed in to change notification settings - Fork 187
Closed
Description
Describe the bug
Windows 11 shows always the task items for its windows combined into one. If one shell of your multi-shell SWT application has an overlay text, it will be shown. So fine so good. But when closing the shell with the overlay text, it remains displayed.
To Reproduce
Please run the following snippet on Windows 11.
import org.eclipse.swt.*;
import org.eclipse.swt.widgets.*;
public class TaskbarTest {
public static void main(String[] args) {
final Display display = new Display();
createShell("Without taskitem", display);
final Shell shell = createShell("With taskitem", display);
final TaskItem item = display.getSystemTaskBar().getItem(shell);
item.setOverlayText("abc");
while (!display.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
}
}
}
private static Shell createShell(String text, Display display) {
final Shell shell = new Shell(display);
shell.setText(text);
shell.addListener(SWT.Close, event -> {
final Shell[] shells = display.getShells();
if (shells.length == 1) {
display.dispose();
}
});
shell.setSize(400, 300);
shell.open();
return shell;
}
}You will see 2 shells, one with task item overlay, one without. Closing the one with overlay causes the task item still to show the item.
Expected behavior
The overlay should be hidden if the shell causing it has been closed/disposed.
Environment:
- Select the platform(s) on which the behavior is seen:
-
- All OS
-
- Windows
-
- Linux
-
- macOS
- Additional OS info (e.g. OS version, Linux Desktop, etc)
Windows 11
Workaround (or) Additional context
None
Metadata
Metadata
Assignees
Labels
No labels
