Bug 202957 - unexpected Paint events when RTL
Summary: unexpected Paint events when RTL
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Steve Northover CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-11 13:34 EDT by Grant Gayed CLA
Modified: 2019-09-06 15:30 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Grant Gayed CLA 2007-09-11 13:34:55 EDT
note that problem does not happen on win2000

- run the snippet below
- click repeatedly on the scrollbars such that they are not moved
  -> you'll see "paint" written to stdout for each click, which should not happen since the viewport did not change
- if you remove the SWT.RIGHT_TO_LEFT style from the snippet then you won't get the unexpected Paint events

public static void main(String[] args) {
	final Display display = Display.getDefault();
	final Shell shell = new Shell(display, SWT.RESIZE | SWT.CLOSE | SWT.RIGHT_TO_LEFT);
	shell.setLayout(new FillLayout());
	final ScrolledComposite scrolledC = new ScrolledComposite(shell, SWT.H_SCROLL | SWT.V_SCROLL);
	scrolledC.setLayout(new FillLayout());
	final Canvas canvas = new Canvas(scrolledC, SWT.NONE);
	final PaintListener paintListener = new PaintListener() {
		public void paintControl(PaintEvent e) {
			System.out.println("paint");
		}
	};
	canvas.addPaintListener(paintListener);
	scrolledC.setContent(canvas);
	scrolledC.setExpandHorizontal(true);
	scrolledC.setExpandVertical(true);
	scrolledC.setMinSize(350, 350);
	shell.setSize(300, 300);
	shell.open();
	while (!shell.isDisposed()) {
		if (!display.readAndDispatch()) display.sleep();
	}
	display.dispose();
}
Comment 1 Eclipse Webmaster CLA 2019-09-06 15:30:26 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.