GDK W32: Use SPI_GETFONTSMOOTHINGTYPE instead of SPI_GETCLEARTYPE

It turns out that SPI_GETCLEARTYPE always returns TRUE.

Fixes #1774 (for real this time).
This commit is contained in:
Руслан Ижбулатов 2020-05-10 00:40:26 +00:00
parent 8b9ce87fc7
commit f67bad2346

View File

@ -802,17 +802,17 @@ _gdk_win32_monitor_get_pixel_structure (GdkMonitor *monitor)
GdkWin32Monitor *w32_m;
BOOL enabled = TRUE;
unsigned int smoothing_orientation = FE_FONTSMOOTHINGORIENTATIONRGB;
BOOL cleartype = TRUE;
UINT cleartype = FE_FONTSMOOTHINGCLEARTYPE;
g_return_val_if_fail (monitor != NULL, NULL);
w32_m = GDK_WIN32_MONITOR (monitor);
SystemParametersInfoW (SPI_GETFONTSMOOTHING, 0, &enabled, 0);
SystemParametersInfoW (SPI_GETCLEARTYPE, 0, &cleartype, 0);
SystemParametersInfoW (SPI_GETFONTSMOOTHINGTYPE, 0, &cleartype, 0);
if (!enabled ||
!cleartype ||
(cleartype == FE_FONTSMOOTHINGSTANDARD) ||
!SystemParametersInfoW (SPI_GETFONTSMOOTHINGORIENTATION, 0, &smoothing_orientation, 0))
return "none";