Skip to content

Commit 30298b2

Browse files
committed
Set size of InformationControl before setLocation
This commit changes the order of how size and location of a newly created InformationControl is set. The order must be setSize followed by setLocation as setting location of the control first could cause DPI_CHANGE events in win32 since the OS is responsible for providing the size to the control o creation and tthis size can be very big spanning across multiple monitors. contributes to eclipse-platform/eclipse.platform.swt#62 and eclipse-platform/eclipse.platform.swt#127
1 parent 1e74269 commit 30298b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bundles/org.eclipse.jface.text/src/org/eclipse/jface/text/AbstractInformationControlManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1185,8 +1185,8 @@ private void internalShowInformationControl(Rectangle subjectArea, Object inform
11851185
cropToClosestMonitor(controlBounds);
11861186
location= Geometry.getLocation(controlBounds);
11871187
size= Geometry.getSize(controlBounds);
1188-
informationControl.setLocation(location);
11891188
informationControl.setSize(size.x, size.y);
1189+
informationControl.setLocation(location);
11901190

11911191
showInformationControl(subjectArea);
11921192
}

0 commit comments

Comments
 (0)