Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 136323 - Shell.getClientArea has side effect
Summary: Shell.getClientArea has side effect
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.2   Edit
Hardware: PC Linux-GTK
: P3 major (vote)
Target Milestone: 3.3 M1   Edit
Assignee: Ed Smith CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-12 09:46 EDT by Tom Hofmann CLA
Modified: 2006-06-13 14:31 EDT (History)
3 users (show)

See Also:


Attachments
ClientAreaSideEffect.java (933 bytes, text/x-java)
2006-04-12 09:49 EDT, Tom Hofmann CLA
no flags Details
Shell.java patch (904 bytes, patch)
2006-05-31 12:20 EDT, Ed Smith CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Hofmann CLA 2006-04-12 09:46:31 EDT
I20060411

Calling Shell::getClientArea on a Shell without trims has the side effect of moving the client area by one pixel up- and leftwards. I will attach a snippet showing the problem.
Comment 1 Tom Hofmann CLA 2006-04-12 09:49:20 EDT
Created attachment 38400 [details]
ClientAreaSideEffect.java

Run the snippet, which creates a main shell and a SWT.NONE shell on top of it. Move the mouse around a little and watch the shell contents switch by one pixel when the getClientArea call is made in the 100th readAndDispatch loop.
Comment 2 Ed Smith CLA 2006-05-31 12:20:15 EDT
Created attachment 43119 [details]
Shell.java patch

This patch proposes a fix for this problem. It prevents the client area from being moved by ensuring the client area is positioned within the shell border when forceResize is called by getClientArea.
Comment 3 Steve Northover CLA 2006-06-09 11:17:57 EDT
Fixed > 20060609