-
Notifications
You must be signed in to change notification settings - Fork 192
Open
Description
Describe the bug
It is possible easily by setting clipping to draw outside a window (shell) on Wayland.
To Reproduce
Run following snippet on a Wayland system:
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
public class DrawOutsideShell {
public static void main(String[] args) {
Display display = new Display();
Shell shell = new Shell(display);
Composite composite = new Composite(shell, SWT.DOUBLE_BUFFERED);
composite.setBounds(-50, 0, 500, 250);
composite.addListener(SWT.Paint, event -> {
event.gc.setClipping(0, 0, 500, 250);
event.gc.fillRectangle(0, 0, 500, 250);
});
shell.setSize(300, 200);
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
}
}
display.dispose();
}
}Expected behavior
The drawing area is clipped to the controls/shells bounds, no matter what clipping area is set by the user.
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)
Tried on latest Fedora and on Linux Mint with experimental Wayland support.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
