@@ -131,7 +131,7 @@ Rectangle getBoundsInPixels () {
131
131
}
132
132
if (width == 0 ) {
133
133
int [] buffer = new int [1 ];
134
- if (OS .SystemParametersInfo (OS .SPI_GETCARETWIDTH , 0 , buffer , 0 )) {
134
+ if (OS .SystemParametersInfoForDpi (OS .SPI_GETCARETWIDTH , 0 , buffer , 0 , DPIUtil . mapZoomToDPI ( getNativeZoom ()) )) {
135
135
return new Rectangle (getXInPixels (), getYInPixels (), buffer [0 ], getHeightInPixels ());
136
136
}
137
137
}
@@ -225,7 +225,7 @@ Point getSizeInPixels () {
225
225
}
226
226
if (width == 0 ) {
227
227
int [] buffer = new int [1 ];
228
- if (OS .SystemParametersInfo (OS .SPI_GETCARETWIDTH , 0 , buffer , 0 )) {
228
+ if (OS .SystemParametersInfoForDpi (OS .SPI_GETCARETWIDTH , 0 , buffer , 0 , DPIUtil . mapZoomToDPI ( getNativeZoom ()) )) {
229
229
return new Point (buffer [0 ], getHeightInPixels ());
230
230
}
231
231
}
@@ -369,7 +369,7 @@ void resize () {
369
369
int widthInPixels = this .getWidthInPixels ();
370
370
if (image == null && widthInPixels == 0 ) {
371
371
int [] buffer = new int [1 ];
372
- if (OS .SystemParametersInfo (OS .SPI_GETCARETWIDTH , 0 , buffer , 0 )) {
372
+ if (OS .SystemParametersInfoForDpi (OS .SPI_GETCARETWIDTH , 0 , buffer , 0 , DPIUtil . mapZoomToDPI ( getNativeZoom ()) )) {
373
373
widthInPixels = buffer [0 ];
374
374
}
375
375
}
@@ -448,7 +448,7 @@ void setFocus () {
448
448
int widthInPixels = this .getWidthInPixels ();
449
449
if (image == null && widthInPixels == 0 ) {
450
450
int [] buffer = new int [1 ];
451
- if (OS .SystemParametersInfo (OS .SPI_GETCARETWIDTH , 0 , buffer , 0 )) {
451
+ if (OS .SystemParametersInfoForDpi (OS .SPI_GETCARETWIDTH , 0 , buffer , 0 , DPIUtil . mapZoomToDPI ( getNativeZoom ()) )) {
452
452
widthInPixels = buffer [0 ];
453
453
}
454
454
}
0 commit comments