Windows maximize on the wrong monitor

Bug #947025 reported by Pete Goodall on 2012-03-05
This bug affects 12 people
Affects Status Importance Assigned to Milestone
Ayatana Design
John Lea
Compiz Core
compiz (Ubuntu)

Bug Description

For windows maximizing on the wrong workspace (single monitor), see bug 776435.

Often when I try to maximise a window that is on the primary display it will move to the secondary display instead. Here is what I did just now:

I have a Chromium window that I want to move from the secondary display to the primary display, so I drag the window over to my primary display, and drag the title bar to the top of the screen.

Result: The window maximises, but on the secondary display instead.

Same scenario, but instead of dragging the window to the top I use the window controls to maximise the window.

Result: The window maximises, but on the secondary display instead.

Same scenario, but I try to maximise on half the primary display by dragging to the left (or right). I'm doing this just to test really.

Result: It works as expected and the window changes dimensions to fit in the left (or right) half of the primary display.

If, after dragging the window to my primary display, I resize the window to make sure that it fits fully w/in the dimensions of the primary display it will maximise on the primary display as expected. Therefore, I suspect the problem is that some part of the window is hanging off-screen and Compiz assumes I want to move the window to the other display. This is a poor assumption, and quite honestly very frustrating. My secondary display is quite a bit larger than the primary and this means this scenario happens frequently.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: compiz 1:
ProcVersionSignature: Ubuntu 3.2.0-17.27-generic 3.2.6
Uname: Linux 3.2.0-17-generic x86_64

ApportVersion: 1.94-0ubuntu1
Architecture: amd64
CompizPlugins: [core,bailer,detection,composite,opengl,compiztoolbox,decor,move,resize,gnomecompat,regex,grid,place,animation,snap,imgpng,vpswitch,workarounds,mousepoll,expo,ezoom,session,wall,fade,scale,unityshell]
CompositorRunning: compiz
Date: Mon Mar 5 10:44:13 2012
DistUpgraded: Fresh install
DistroCodename: precise
DistroVariant: ubuntu
 virtualbox, 4.1.8, 3.2.0-17-generic, x86_64: installed
 virtualbox, 4.1.8, 3.2.0-18-generic, x86_64: installed
 Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller [8086:0126] (rev 09) (prog-if 00 [VGA controller])
   Subsystem: Lenovo Device [17aa:21da]
MachineType: LENOVO 4287CTO
PackageArchitecture: all
 PATH=(custom, user)
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.2.0-17-generic root=UUID=f9fa28fa-904b-4d39-aaec-c28fae337ae4 ro quiet splash vt.handoff=7
SourcePackage: compiz
UpgradeStatus: No upgrade log present (probably fresh install) 07/01/2011
dmi.bios.vendor: LENOVO
dmi.bios.version: 8DET49WW (1.19 )
dmi.board.asset.tag: Not Available 4287CTO
dmi.board.vendor: LENOVO
dmi.board.version: Not Available
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Not Available
dmi.modalias: dmi:bvnLENOVO:bvr8DET49WW(1.19):bd07/01/2011:svnLENOVO:pn4287CTO:pvrThinkPadX220:rvnLENOVO:rn4287CTO:rvrNotAvailable:cvnLENOVO:ct10:cvrNotAvailable: 4287CTO
dmi.product.version: ThinkPad X220
dmi.sys.vendor: LENOVO
version.compiz: compiz 1:
version.ia32-libs: ia32-libs 20090808ubuntu33
version.libdrm2: libdrm2 2.4.30-1ubuntu1
version.libgl1-mesa-dri: libgl1-mesa-dri 8.0.1-0ubuntu2
version.libgl1-mesa-dri-experimental: libgl1-mesa-dri-experimental N/A
version.libgl1-mesa-glx: libgl1-mesa-glx 8.0.1-0ubuntu2
version.xserver-xorg-core: xserver-xorg-core 2:1.11.4-0ubuntu4
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev 1:
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:6.14.99~git20111219.aacbd629-0ubuntu2
version.xserver-xorg-video-intel: xserver-xorg-video-intel 2:2.17.0-1ubuntu4
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:0.0.16+git20111201+b5534a1-1build2

Pete Goodall (pgoodall) wrote :
John Lea (johnlea) on 2012-03-05
summary: - Windows maximise only on the secondary display
+ Multi-monitor - Windows maximise only on the secondary display
tags: added: udp
Changed in ayatana-design:
assignee: nobody → John Lea (johnlea)
importance: Undecided → Critical
status: New → Triaged
Changed in compiz-core:
status: New → Confirmed
Changed in compiz (Ubuntu):
status: New → Confirmed
Tim Penhey (thumper) on 2012-04-16
Changed in ayatana-design:
status: Triaged → Fix Committed
Changed in compiz-core:
importance: Undecided → High
Changed in compiz-core:
milestone: none →
description: updated

This bug occurs (at least in my case) not with every kind of windows.
For example Nautilius works fine, but firefox is always problematic.

Ian Hincks (ian-hincks) wrote :

This bug also affects me. The suggested workaround works for me. I figured out how to reproduce the bug everytime (at least in my case):

1) Maximize a window to the secondary monitor
2) Unmaximize the window on the secondary monitor.
3) Resize the window so that it is too big to fit in the primary monitor
4) Drag the window to the primary monitor (because it is too big to fit, part of it will be in a different workspace)
5) Maximize the the window

Result: Even though the window is almost entirely in the primary monitor, it maximizes to the secondary monitor.

Pawel Matuszyk (pawel-matu) wrote :

I've found another workaround.
'compiz --replace' seems to solve the problem (till the next restart), but it's still annoying to do this after each start.

Lalo Martins (lalo.martins) wrote :

I have this. It consistently happens with Chromium and Evince, it doesn't with most other windows.

The workaround does *not* work for me; these windows maximize to the secondary monitor regardless of size. (I had thought of that before and tried.)

Changed in compiz (Ubuntu):
importance: Undecided → High
Changed in compiz-core:
status: Confirmed → Triaged
Changed in compiz (Ubuntu):
status: Confirmed → Triaged
tags: added: multimonitor
Éric Piel (pieleric) wrote :

I have a left(small)-right(big) monitor setup and the current behaviour seems to be affected only by the size of both monitors. If a window situated on the small monitor has a vertical size bigger than the small monitor _and_ smaller than the big monitor, when maximized, it is automatically moved to the big monitor. Same happens for the horizontal size. If the window size is so large that it doesn't fit in the big monitor it stays in the small monitor.

I'd say the expected behaviour is that the window is placed on the monitor which has the largest intersection area with the window.

mvtlam (s-mvtlam) wrote :

Éric Piel's comment is right, i just tested and this is the problem on my computer.

Changed in compiz:
importance: Undecided → High
status: New → Triaged
Daniel van Vugt (vanvugt) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. This particular bug has already been reported and is a duplicate of bug 760240, so it is being marked as such. Please look at the other bug report to see if there is any missing information that you can provide, or to see if there is a workaround for the bug. Additionally, any further discussion regarding the bug should occur in the other report. Feel free to continue to report any other bugs you may find.

summary: - Multi-monitor - Windows maximise only on the secondary display
+ Windows maximize on the wrong monitor
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers