Backport 'fix integer overflow in monitor refresh rate calculation' to GTK3

Original MR by Volker Rümelin.

See https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/2884
This commit is contained in:
Luca Bacci 2021-06-04 17:43:24 +02:00
parent 5aa878d8e5
commit 547ea8b073
No known key found for this signature in database
GPG Key ID: 8E3C8D989C98883D

View File

@ -523,7 +523,7 @@ populate_monitor_devices_from_display_config (GPtrArray *monitors)
refresh = &dispconf_paths[path_index].targetInfo.refreshRate;
gdk_monitor_set_refresh_rate (mon,
refresh->Numerator * 1000 / refresh->Denominator);
refresh->Numerator * (UINT64) 1000 / refresh->Denominator);
}
g_free (dispconf_paths);