diff --git a/src/Objects/VirtualMonitor.vala b/src/Objects/VirtualMonitor.vala index 450add74..bdfc12c2 100644 --- a/src/Objects/VirtualMonitor.vala +++ b/src/Objects/VirtualMonitor.vala @@ -134,8 +134,10 @@ public class Display.VirtualMonitor : GLib.Object { height = current_mode.height; } else { var current_mode = monitor.current_mode; - width = current_mode.width; - height = current_mode.height; + // Apply scaling, then force rounding up by adding "0.49" before converting to int, + // to avoid gaps between monitors in the configuration + width = (int)((current_mode.width / scale) + 0.49); + height = (int)((current_mode.height / scale) + 0.49); } } diff --git a/src/Widgets/DisplayWidget.vala b/src/Widgets/DisplayWidget.vala index 2cbfbc5f..7346c388 100644 --- a/src/Widgets/DisplayWidget.vala +++ b/src/Widgets/DisplayWidget.vala @@ -433,7 +433,9 @@ public class Display.DisplayWidget : Gtk.Box { // Prevent breaking autohide by closing popover popover.popdown (); + virtual_monitor.get_current_mode_size (out real_height, out real_width); configuration_changed (); + check_position (); }); rotation_combobox.set_active ((int) virtual_monitor.transform);