Bug 583090 - SWT Composite setSize() chops at 64K sizes on Windows 10 and 11
Summary: SWT Composite setSize() chops at 64K sizes on Windows 10 and 11
Status: NEW
Alias: None
Product: Incubator
Classification: Eclipse Project
Component: e4 (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 11
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: E4 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-27 13:42 EDT by Randy Karasek CLA
Modified: 2024-03-27 14:46 EDT (History)
0 users

See Also:


Attachments
Small Java SWT test program demonstrating setSize() defect (5.07 KB, application/octet-stream)
2024-03-27 13:42 EDT, Randy Karasek CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Randy Karasek CLA 2024-03-27 13:42:34 EDT
Created attachment 289338 [details]
Small Java SWT test program demonstrating setSize() defect

The attached is a small SWT program that simply has a ScrolledComposite containing a Composite containing a Text widget. Attempts to call Composite setSize() with a point of X or Y value larger than 32K gets "chopped" at 32K.

The attached program creates a long text String and correctly calculates new Composite size based on the long String. Calling composite.setSize() accepts the newly calculated bounds, no exception, but immediate call to composite.getSize() always returns 32K.

The provided example just calls println() with the size being passed to setSize(), and then the value immediately returned with getSize(). They should be the same, but getSize() is constant 32K.

My speculation somewhere the signed integer X,Y from the Point object is getting cast/converted to unsigned short. Could be an issue with the SWT JNI wrapper, or possibly in the Windows DLL, but the same example fails on RHEL Linux using the GTK wrapper.
Comment 1 Randy Karasek CLA 2024-03-27 14:46:41 EDT
Apologizes, should be 64K. The integer size values appear to be chopped at 64K, unsigned short max.