compiz team mailing list archive
Mailing list archive
[Bug 1656248] [NEW] Changing the order of monitors leads to off-screen windows
Public bug reported:
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
- 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
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
The fix for the problem is to save the current desktop resolution not
only when the resolution changes, but every time the display
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-0.9.11.3+14.04.20160425. But the problem seems still to be present in the latest upstream source. I haven't tested this, but the problematic code is still the same.
** Affects: compiz (Ubuntu)
** Tags: patch
** Patch added: "compiz_fix_monitor_reconfiguration.patch"
** Tags added: patch
You received this bug notification because you are a member of compiz
packagers, which is subscribed to compiz in Ubuntu.
Changing the order of monitors leads to off-screen windows
To manage notifications about this bug go to: