Skip to content

Commit 1315540

Browse files
amartya4256fedejeanne
authored andcommitted
Avoid unnecessary DPI_CHANGE event in Windows
Set the size of order of the information control before setting its location in order to avoid an unnecessary DPI_CHANGE event in Windows. Setting the location of the control before setting its size could cause a DPI_CHANGE event in win32 since the OS is responsible for providing the size to the control upon creation and this size can be very big, causing the control to span across multiple monitors. contributes to eclipse-platform/eclipse.platform.swt#62 and eclipse-platform/eclipse.platform.swt#127
1 parent 7769937 commit 1315540

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)