I've been looking at this and have a working solution, but I have to
make some compromises on the geometry of restoring the maximized window.
Since the monitor that got removed may have had a much larger resolution
than the current monitor, I think it's best to restore the window to the
top left of the workspace since it's conceivable that it could restore
somewhere far to the right and/or far to the bottom and still wouldn't
look right.  Also, if the restored window is still larger than the
screen even with the window positioned at the top left, then the window
will be shrunk to fit the screen.

** Summary changed:

-  Adding/Removing an external monitor causes open fullscreen windows to move 
to another workspace
+ Adding/Removing an external monitor causes maximized windows to move to 
another workspace

** Changed in: compiz (Ubuntu)
       Status: Triaged => In Progress

** Changed in: compiz (Ubuntu)
     Assignee: (unassigned) => Christopher Townsend (townsend)

** Changed in: compiz
    Milestone: 0.9.10.3 => 0.9.11.0

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to compiz in Ubuntu.
https://bugs.launchpad.net/bugs/1171878

Title:
  Adding/Removing an external monitor causes maximized windows to move
  to another workspace

Status in Compiz:
  In Progress
Status in “compiz” package in Ubuntu:
  In Progress

Bug description:
  If I plug in external monitor, move a window to it, maximize window and 
remove external monitor, window is moved to the same workspace primary screen - 
this is correct behavior, but when I un-maximize it - window moves to different 
workspace. This most likely is because original window positions are not 
updated after removing the monitor and un-maximize still uses those old values 
to move the window to supposedly original position.
  Another use case is when window movement is somewhat wrong - external monitor 
plugged in, window is maximized on primary screen, move focus to different 
workspace, unplug the monitor, move back to the workspace when we have 
fullscreen window, unmaximize it - window un-maximizes not to original 
position, it's moved away by the same mount of pixels as external monitor width 
is.

  I expect that window stays on the same workspace - once it's on it it
  should not move unless I do that manually, also I expect that un-
  maximizing moves window to original position, not different.

  This is continuation of bug
  https://bugs.launchpad.net/compiz/+bug/763148, fullscreen window bug
  was separated as per "Christopher Townsend (townsend) wrote on
  2013-04-18".

  P.S. Most likely bug can be fixed quite easy as behavior is similar to
  bug I mentioned, hopefully this can be included in the same SRU.

  thanks in advance
  Eduards

To manage notifications about this bug go to:
https://bugs.launchpad.net/compiz/+bug/1171878/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to