Changing the order of monitors leads to off-screen windows
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
compiz (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
The following steps lead to off-screen windows when using compiz on Ubuntu 14.04 (e.g. when using Unity), and having no virtual desktops configured:
- Start system and login (with only one monitor connected, or using a laptop)
- Connect an additional monitor after logging in, or connect the laptop to a docking station with an external monitor connected to it (which then should be automatically configured to be the right monitor)
- Open a window on the additional (right) monitor
- Change the order of monitors in the display settings (put the originally left monitor to the right, and vice versa)
- Now the window which was opened on the originally right (now left) monitor is now off-screen
The problem is, that when the order of monitors get changed, the code that recalculates the window positions, calculates the wrong positions.
To calculate the new window positions, the code saves the current desktop resolution (in case the resolution changes), then changes the display configuration (e.g. enables the new monitor and re-configures the desktop) and then uses the saved (now old) desktop resolution to calculate the window positions for the new resolution.
The problem is, that when changing the order of monitors, as described above, the code does not actually save the current desktop resolution (the resolution of the both monitors combined), so does not realize that the desktop resolution has actually not changed (just the order of monitors).
It then uses the old saved resolution (which was the resolution for the initial single-monitor configuration). It then calculates the wrong new window positions (because it thinks the window was an a non-existing virtual desktop).
The fix for the problem is to save the current desktop resolution not only when the resolution changes, but every time the display configuration changes.
The problem also exists when using virtual desktops, but then the window might only be pushed to another virtual desktop, or still off-screen, depending on where the windows was placed initially.
I will attach a patch that solves the problem. The patch makes sure that the current desktop resolution gets saved every time the display configuration changes, and not only when the actual desktop resolution changes.
The patch is against compiz-
Changed in compiz (Ubuntu): | |
status: | New → Incomplete |
The attachment "compiz_ fix_monitor_ reconfiguration .patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.
[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]