mirror of
https://github.com/brl/mutter.git
synced 2025-02-02 23:03:00 +00:00
monitor-config-manager: Round layout size after scaling
When calculating the logical monitor layout size given a scale, don't risk precision loss by float to int casting, which could result in a too small layout. https://bugzilla.gnome.org/show_bug.cgi?id=765011
This commit is contained in:
parent
666bef7af9
commit
4786cc85bd
@ -545,8 +545,8 @@ create_preferred_logical_monitor_config (MetaMonitorManager *monitor_ma
|
|||||||
switch (layout_mode)
|
switch (layout_mode)
|
||||||
{
|
{
|
||||||
case META_LOGICAL_MONITOR_LAYOUT_MODE_LOGICAL:
|
case META_LOGICAL_MONITOR_LAYOUT_MODE_LOGICAL:
|
||||||
width /= scale;
|
width = (int) roundf (width / scale);
|
||||||
height /= scale;
|
height = (int) roundf (height / scale);
|
||||||
break;
|
break;
|
||||||
case META_LOGICAL_MONITOR_LAYOUT_MODE_PHYSICAL:
|
case META_LOGICAL_MONITOR_LAYOUT_MODE_PHYSICAL:
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user