Removing an external monitor will move a maximized window to the current workspace

Bug #1304531 reported by Christopher Townsend
48
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Compiz
Fix Released
Medium
Christopher Townsend
0.9.11
Fix Released
Medium
Christopher Townsend
compiz (Ubuntu)
Fix Released
Medium
Christopher Townsend
Trusty
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

Many users tend to have maximized window opened on other workspaces and use an external monitor such as a projector or one connected to a laptop docking station. When removing this monitor, these maximized windows will get shuffled to the current workspace. This can be aggravating for users and is not a good user experience.

[Test case]

1. Have an external monitor.
2. Use multiple workspaces.
3. Open a window and maximize it on a workspace such as workspace 2.
4. Move to another workspace such as workspace 3.
5. Remove the external monitor.

[Regression potential]

The code here is quite fragile and can be prone to some unexpected behaviors. I took great care in trying to make sure no new regressions are caused by this fix, but there may be some corner case that is unaccounted for. Also note that there are already some broken behaviors in this area that are unfixed by this code, so keep that in mind when testing that it truly isn't a regression.

* Debdiff is found at https://launchpadlibrarian.net/178439518/compiz-trusty-sru-2.debdiff *

Original Description:

Removing an external monitor when using multiple workspaces will cause maximized windows on other workspaces to move to the current workspace.

Scenario:
1. Have an external monitor.
2. Use multiple workspaces.
3. Open a window and maximize it on a workspace such as workspace 2.
4. Move to another workspace such as workspace 3.
5. Remove the external monitor.

Expected behavior:
Maximized window will remain on the workspace it was opened on.

Observed behavior:
Maximized window moves to the current workspace

Related branches

Changed in compiz:
status: New → Confirmed
Changed in compiz (Ubuntu):
status: New → Confirmed
Changed in compiz:
importance: Undecided → Medium
Changed in compiz (Ubuntu):
importance: Undecided → Medium
Changed in compiz:
assignee: nobody → Christopher Townsend (townsend)
Changed in compiz (Ubuntu):
assignee: nobody → Christopher Townsend (townsend)
Changed in compiz:
milestone: none → 0.9.11.0
Revision history for this message
indy (davide-ricci82) wrote :

This bug goes on since several years; everyone plug in an external screen (laptop at work, for example) experience that.

It was only partially resolved here https://bugs.launchpad.net/compiz/+bug/1171878 for unmaximized windows.

Changed in compiz:
status: Confirmed → In Progress
Changed in compiz (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package compiz - 1:0.9.11+14.10.20140606-0ubuntu1

---------------
compiz (1:0.9.11+14.10.20140606-0ubuntu1) utopic; urgency=low

  [ Chris Townsend ]
  * Only ungrab the Mod2Mask modifier on buttons 4-7 to allow scrolling
    in unfocused Gtk windows while still allowing keybinding modifiers
    to other scroll wheel actions. (LP: #1311788)
  * Fix issue where window decorations would be placed under the Panel
    when opening a new window from an already open window. This is due
    to the already open window being taller or just as tall without be
    maximized than the workspace. (LP: #1303462)
  * Only constrain the non-modifier scrolling to the vertical scrolling
    buttons - buttons 4 & 5. (LP: #1311303)
  * Fix issue where maximized windows would get moved to different
    workspaces when disconnecting/connecting an external monitor.
    Windows should stay in the same workspace they are in when the
    monitor event occurs. (LP: #1304531)
  * Fix issue where custom keyboard shortcuts would get reset to
    defaults when rebooting or restarting Compiz. (LP: #1063617)
  * Fixes issue in the Expo plugin where a gap is shown in the place
    where the Launcher and Panel should be when windows are maximized.
    This was originally removed in rev. 3481. (LP: #1087090)
  * Fix issue where horizontal and vertical keyboard resizing could not
    happen at the same time. (LP: #347390)

  [ Marco Trevisan (Treviño) ]
  * Scale: use XShape extension to exclude dnd input in the screen-parts
    outside workArea This will work property also in multi-monitor,
    without requiring multiple X windows for each output device. Also
    don't terminate the scale unless a drag-n-drop action is not really
    over. Add a spinner that shows up over a window, during the DnD
    timeout. Plus, make sure we terminate the scale without focusing the
    selected icon when cancelling it and some code cleanup (LP: #607796)
  * Event: set the screen grabbed also when we get a NotifyWhileGrabbed
    Focus{In,Out} event (LP: #1305586)
 -- Ubuntu daily release <email address hidden> Fri, 06 Jun 2014 09:43:06 +0000

Changed in compiz (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Gao Shichao (xgdgsc) wrote :

Will it be released to 14.04? Or can I install the 14.10 package on 14.04?

Changed in compiz:
status: In Progress → Fix Committed
Changed in compiz:
milestone: 0.9.11.0 → 0.9.12.0
description: updated
description: updated
Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello Christopher, or anyone else affected,

Accepted compiz into trusty-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/compiz/1:0.9.11.1+14.04.20140617-0ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in compiz (Ubuntu Trusty):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Gao Shichao (xgdgsc) wrote :

I tried compiz 1:0.9.11.1+14.04.20140617-0ubuntu1 in trusty-proposed and confirm it is fixed. Thanks.

tags: added: verification-done
removed: verification-needed
description: updated
Revision history for this message
Chris J Arges (arges) wrote :

Hello Christopher, or anyone else affected,

Accepted compiz into trusty-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/compiz/1:0.9.11.1+14.04.20140623-0ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: removed: verification-done
tags: added: verification-needed
Revision history for this message
Jason Haar (jhaar-launchpad) wrote :

Hi there

I implemented the patch some weeks ago and had great success. But yesterday and today the problem came back! In both cases going from work with a laptop docked into an external monitor to home with no external monitor triggered the collapse of some of my apps in separate workspaces back into one workspace

I'm a long time Fedora user but a first-time Ubuntu user, so my log searches may be off, but I don't think my patched compiz has been replaced with an more-official-but-broken version (dated May 20, compiz-1:0.9.11+14.04.20140423-0ub), so it looks like the patched version may still have a glitch in it. Pity - it has worked rock-solid since it was installed until yesterday

Revision history for this message
Mateusz Stachowski (stachowski-mateusz) wrote :

Jason you should have the version that is listed in comment #6.

apt-cache policy compiz
compiz:
  Installed: 1:0.9.11.1+14.04.20140623-0ubuntu1

This version is in Trusty proposed. You can enable proposed by going to "Software & Updates" and then on actualisations tab check trusty-proposed.

Revision history for this message
Jason Haar (jhaar-launchpad) wrote :

Thanks for that, I have done that now and have the newer version, let's see how it goes :-)

Revision history for this message
Mateusz Stachowski (stachowski-mateusz) wrote :

And how did it go?

If the newer version from proposed resolved the issue for you then please change the tag to verification-done and if it didn't to verification-failed.

Revision history for this message
Jason Haar (jhaar-launchpad) wrote :

I haven't had the problem since I upgraded, so I've marked it as "Confirmed". Hopefully that was the right thing to do

Changed in compiz (Ubuntu Trusty):
status: Fix Committed → Confirmed
Gao Shichao (xgdgsc)
tags: added: verification-done
removed: verification-needed
Changed in compiz (Ubuntu Trusty):
status: Confirmed → Fix Committed
Revision history for this message
Christopher Townsend (townsend) wrote :

Hello Christopher, or anyone else affected,

Accepted compiz into trusty-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/compiz/1:0.9.11.1+14.04.20140701-0ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-needed
removed: verification-done
Revision history for this message
Gao Shichao (xgdgsc) wrote :

I tested 1:0.9.11.1+14.04.20140701-0ubuntu1 in proposed, it is fine.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package compiz - 1:0.9.11.1+14.04.20140701-0ubuntu1

---------------
compiz (1:0.9.11.1+14.04.20140701-0ubuntu1) trusty; urgency=medium

  [ Chris Townsend ]
  * Bump version to 0.9.11.1.

  [ Ubuntu daily release ]
  * New rebuild forced
 -- Ubuntu daily release <email address hidden> Tue, 01 Jul 2014 11:51:26 +0000

Changed in compiz (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Jason Haar (jhaar-launchpad) wrote :

I think the problem has re-appeared :-(

I rebooted 16 days ago and can see that 18 days ago (2014-07-18) there was a compiz update

compiz-core:amd64 (0.9.11.1+14.04.20140701-0ubuntu1, 0.9.11.2+14.04.20140714-0ubuntu1) [plus related]

What I've noticed in the past week is that windows are starting to show up where they aren't meant to be. ie it's "collapsing" in on itself again, exactly the same as my bug report in 1321221 (ie going from laptop to docking station-with-monitor and visa/versa triggers it)

Could the patch have been reversed out?

Revision history for this message
HRJ (harshad-rj) wrote :

I updated the compiz packages today, and I also noticed a reappearance of the problem.

compiz (1:0.9.11.1+14.04.20140701-0ubuntu1) to 1:0.9.11.2+14.04.20140714-0ubuntu1

Should we open a fresh bug report?

Revision history for this message
Christopher Townsend (townsend) wrote :

Yes, please open a new bug report and I will investigate.

Revision history for this message
Christopher Townsend (townsend) wrote :

Also, just quickly looking between the two versions, the only thing that changed was in the Scale plugin and I don't see how that has caused this to regress. I will need to dig in to this.

Revision history for this message
HRJ (harshad-rj) wrote :

@townsend

The specific regressions I am seeing are:

After switching monitors, windows can't be moved to a different workspace until they are un-maximised.
Also, windows that were not-maximised before the new monitor was plugged in, end up spanning multiple workspaces.

Stephen M. Webb (bregma)
Changed in compiz:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.