elementary / switchboard-plug-display

Switchboard Displays Plug
https://elementary.io
GNU General Public License v3.0
14 stars 18 forks source link

Remove offsets from virtual monitors #315

Closed davidmhewitt closed 3 years ago

davidmhewitt commented 3 years ago

Fixes #314

Follow up to #311

It wasn't possible to disable monitors on the left or above the other enabled monitors as doing so would leave a gap in the "virtual monitors" co-ordinate space where mutter expects them to start from 0,0.

So, once we've filtered out the disabled monitors, offset them by their minimum co-ordinate to get them arranged around 0,0.

I've additionally made get_current_mode_size return the preferred size for disabled monitors instead of a hardcoded value, which makes positioning and re-enabling disabled monitors easier.

davidmhewitt commented 3 years ago

Tested and confirmed to work with 4 monitors by OP of the original issue report.