Multi-monitor - Windows maximize on the wrong monitor

Reported by karoly.vegh on 2011-04-05
800
This bug affects 174 people
Affects Status Importance Assigned to Milestone
Ayatana Design
Critical
John Lea
Compiz
High
Daniel van Vugt
0.9.8
High
Charon
Compiz Core
High
Charon
compiz (Ubuntu)
High
Daniel van Vugt
Nominated for Precise by Timo Jyrinki
Quantal
Undecided
Unassigned

Bug Description

[Test Case]

1. Have a multi-monitor environment ready
2. Open a terminal window
3. Move the window to be in-between two monitors
4. Maximize the window
   -> Make sure the window gets maximized on the correct monitor - the one that has most of the window.

[Regression Potential]

Windows that are too big to fit a given screen can still get the window maximized.

Original description:

For windows maximizing on the wrong workspace, see bug 776435 instead.

Binary package hint: unity

I have a notebook, using it with an external monitor attached to it in a dual-screen setup (See attached screenshots, the little screen is that of the notebook, the large screen is that of the external monitor attached to the top of the notebook's screen.

If I maximize windows, two things go wrong:

1) the maximized windows always end up on the large screen, all the same if it was originally on the smaller one.
2) their top window-frame-bar (containing the minimize-maximize-close buttons) ends up on the top of the small screen.

See screenshots: Screenshot-1 is showing the situation before maximizing, Screenshot-2 shows the situation after maximizing.

I am not 100% sure, but I guess this is only this way since my last natty update.

-------------------------------------------------------------
Desired Solution:

- When a user maximises a window, the window should always maximise on the the monitor that contains the majority of the window at the moment the user gives the maximise command.

Related branches

lp:~vanvugt/compiz/fix-751605
Merged into lp:compiz/0.9.9 at revision 3471
Sam Spilsbury: Approve on 2012-11-16
PS Jenkins bot: Approve (continuous-integration) on 2012-11-15
MC Return: Approve on 2012-11-15
John Lea: Pending requested 2012-11-15
karoly.vegh (karoly-vegh) wrote :
karoly.vegh (karoly-vegh) wrote :
Omer Akram (om26er) on 2011-04-11
tags: added: multimonitor
Alex Launi (alexlauni) on 2011-04-13
Changed in unity:
importance: Undecided → Low
status: New → Confirmed
Changed in unity (Ubuntu):
importance: Undecided → Low
status: New → Confirmed
Paweł Mański (paff) wrote :

I have the same problem. Laptop monitor is under my external monitor. Maximising window is always switching to my external monitor.
Second strange behavior is crashing windows while resizing on my bottom (laptop) monitor.

Gordon Ball (chronitis) wrote :

I also use vertically-stacked dual monitors, however I do not see the odd maximisation behaviour. I suspect it is significant that the two screens have the same width, but different heights (1280x800, 1280x1024).

However, I do see the issue with maximised windows in the secondary screen disappearing under the title bar. This appears to be broadly similar to #707346 (the same issue, but in gnome).

Tobias Kuhn (tkuhn) wrote :

I experienced this problem with natty, but after upgrading to oneiric it has disappeared. I hope this is solved for good.

Danny Brugman (dbrugman72) wrote :

Same here - after upgrading to Oneiric I'm no longer experiencing this issue

Jo Vermeulen (jozilla) wrote :

A similar problems happens with 12.04, when trying to maximize windows who are larger than the display you want to maximize them on (but will fit on the other display), these windows get maximized on the other display instead. That's pretty counterintuitive to me, windows should just be resized to fit the resolution of the display.

See also this thread: http://askubuntu.com/questions/131177/snap-to-full-screen-not-working-dual-monitors

Sean DS (se4n-1) wrote :

This problem is indeed present in Quantal, it appears to only affect people using a dual head setup when one screen is smaller than the other.

This effect is most annoying when working with many open pdf documents, moving them from large to small with snap fails so I have to use the compiz move window plugin and reach for the keyboard every time. Not great for workflow really.

htrex (hantarex) wrote :

This happens in Precise too, but I think it's not only related to having monitors with different resolutions, in fact sometimes the window is correctly maximized to the smaller monitor.

The bug is triggered when you try to maximize a window that is taller or larger than the monitor you're trying to maximize the window to, such when you drag a maximized window from a bigger monitor to the smaller and the automatically restored unmaximized window size is bigger on one of the two dimensions in respect to the monitor you're dragging the window to.

Seems there's a simple flaw in the governing logic, hope will be fixed soon and the patch backported to Precise.

summary: - maximizing windows in a dualscreen setup goes awry
+ Windows maximize on the wrong monitor
affects: unity → compiz
affects: unity (Ubuntu) → compiz (Ubuntu)
Changed in compiz:
milestone: none → 0.9.8.0
description: updated
Changed in compiz:
importance: Low → Medium
Changed in compiz (Ubuntu):
importance: Low → Medium
John Lea (johnlea) on 2012-06-25
Changed in ayatana-design:
assignee: nobody → John Lea (johnlea)
importance: Undecided → Critical
status: New → Fix Committed
Changed in compiz-core:
status: New → Confirmed
tags: added: udp
summary: - Windows maximize on the wrong monitor
+ Multi-monitor - Windows maximize on the wrong monitor
description: updated
Nicolas DS (zyphos) wrote :

I have found a workaround (Because Ubuntu12.04 still doesn't have the fix commited for now) .
You must use the keyboard and the mouse.

I you want to maximize on left screen:
1. Drag your window in the left monitor, with your mouse (normal size)
2. CTRL + SUPER + left arrow
3. CTRL + SUPER + up arrow

I you want to maximize on right screen:
1. Drag your window in the right monitor, with your mouse (normal size)
2. CTRL + SUPER + right arrow
3. CTRL + SUPER + up arrow

John Lea (johnlea) on 2012-07-03
Changed in compiz (Ubuntu):
importance: Medium → High
importance: High → Critical
Andrea Cimitan (cimi) wrote :

I confirm comment #9.

Maximization (both snap and through window buttons) works if the window you're maximizing can fit into the smaller screen, otherwise immediately goes into the bigger screen. Tested with both wide and tall windows, all small windows (that fit into the smaller screen), can be maximized correctly.

Ari (ari-lp) wrote :

Confirmed on Ubuntu Precise 12.04 LTS.

# ari@AcerUBN:~$ lsb_release -a
# LSB Version: core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch
# Distributor ID: Ubuntu
# Description: Ubuntu 12.04.1 LTS
# Release: 12.04
# Codename: precise

Workaround described in post #10 works fine here.

John Lea (johnlea) on 2012-08-22
Changed in compiz:
importance: Medium → High
Changed in compiz-core:
importance: Undecided → High
summary: - Multi-monitor - Windows maximize on the wrong monitor
+ [regression] Multi-monitor - Windows maximize on the wrong monitor
Daniel van Vugt (vanvugt) wrote :

Regression? Did it ever work? What release?

summary: - [regression] Multi-monitor - Windows maximize on the wrong monitor
+ Multi-monitor - Windows maximize on the wrong monitor
Changed in compiz:
milestone: 0.9.8.0 → 0.9.8.1
Hernando Torque (htorque) wrote :

Working in 11.10 updates → 1:0.9.6+bzr20110929-0ubuntu6.1.

dmiller309 (dmiller309) wrote :

What's also problematic here is that the window maximize preview is not on the display that the window ends up maximizing to.

Try this:
1. Put a small display (laptop screen) on the left, and a larger display (monitor) on the left.
2. Resize a window in the larger display so that it fills the display, but isn't maximized. It should be larger than the smaller display.
3. Clicking the window's title bar, drag it to the top of the smaller display, and notice that the maximize preview is on the smaller display.
4. Let up on the cursor, and notice that the window maximizes to the larger screen.

Then try this:
1. Put one display on the left, and one on the right.
2. Dragging a window by the title bar, move the mouse so that it is to the right of the border between the 2 screens. The window snap preview will show the window snapping to the left side of the right screen.
3. Without letting up, continue to drag the window to the right side of the left monitor. The window snap preview will not move.
4. Let up on the mouse, and notice that the window maximizes to the right half of the left screen even though the preview is on the left half of the right screen.

It was suggested in this thread that the desired solution is to "always maximise on the the monitor that contains the majority of the window at the moment the user gives the maximise command." I think it would be more intuitive to always maximize the window to where the maximize preview is, and make sure that the maximize preview is in the correct location. For the window maximize/snap preview, the behavior is to maximize the window based on where the mouse is, not where the majority of the window is. I suppose you could classify the second example above as a separate bug, that when you move your mouse between different snap locations the snap preview doesn't update even though the location that the window actually maximizes to does.

Changed in compiz:
milestone: 0.9.8.2 → 0.9.8.4
Changed in compiz:
assignee: nobody → Łukasz Zemczak (sil2100)
Changed in compiz:
status: Confirmed → In Progress
Changed in compiz:
milestone: 0.9.8.4 → 0.9.8.6
John Lea (johnlea) on 2012-10-10
Changed in compiz:
importance: High → Critical
Changed in compiz-core:
importance: High → Critical
status: Confirmed → Triaged
Changed in compiz (Ubuntu):
status: Confirmed → Triaged
Changed in compiz:
milestone: 0.9.8.6 → 0.9.9.0

Reproduced also in Ubuntu 12.10 upgraded from 12.04.1 LTS
Using compiz and unity.

The issue only occurs when maximizing a Terminal with 2 or more tabs on the laptop screen and moving to another workspace.
When returning the Terminal is in the External screen.

Kostya Kovalskyy (kostyarjcnz) wrote :

This bug occurs in Ubuntu 12.10 too.

I am using Compiz + Unity.

Please fix it! It's really annoying.

I would like to add that when the window is minimized to fit the screen of the smaller monitor it works correctly.

Adam Niedling (krychek) wrote :

For me it's working correctly with Nautilus but not with Chromium. Strange. (Ubuntu 12.10)

Changed in compiz:
assignee: Łukasz Zemczak (sil2100) → Daniel van Vugt (vanvugt)
Changed in compiz:
status: In Progress → Triaged
alex (alex-bungker) wrote :

Confirmed the same behaviour here only for Google chrome

it works with the rest (Nautilus, Chromium, Firefox, pdf document viewer)

Ubuntu version 12.04
Display 1: Thinkpad T420s (1600x900) - 16:9
Display 2: HP 1955 (1280x1024) - 5

This is still an issue with all windows that are too big. I don't
understand why this bug keeps being put back to triaged, instead of just
fixed. It's been there for at least a year now. That's too long for such an
obvious problem.

On 8 November 2012 11:34, alex <email address hidden> wrote:

> Confirmed the same behaviour here only for Google chrome
>
> it works with the rest (Nautilus, Chromium, Firefox, pdf document
> viewer)
>
> Ubuntu version 12.04
> Display 1: Thinkpad T420s (1600x900) - 16:9
> Display 2: HP 1955 (1280x1024) - 5
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (966547).
> https://bugs.launchpad.net/bugs/751605
>
> Title:
> Multi-monitor - Windows maximize on the wrong monitor
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ayatana-design/+bug/751605/+subscriptions
>

--
http://avond.schemering.nl

Daniel van Vugt (vanvugt) wrote :

OK, it took me a surprisingly long time to reproduce the problem but now I can reproduce it in some unnatural cases:
  (a) The centre of the window is below the bottom of the bottom-most monitor (or right of the right-most); or
  (b) The height of the window is greater than the height of the monitor it's mostly on (and probably applies to width too).

I still cannot reproduce the bug in any "natural" case where (c) a window smaller than the monitor it's on (and centred) fails to maximize on that monitor. That's the main case reported at the top of the bug and the main case that worries me. I can't reproduce it.

Can anyone reproduce (c) any more or is it just (a) and (b) that are a problem?

Daniel van Vugt (vanvugt) wrote :

All,

If you can reproduce this bug, particularly in case (c) above, please run "xrandr" and paste the output here.

wacked_up (arianvg) wrote :

Here is a way to reproduce it 100% of the time.
1. Have the bigger monitor on the left, and have a window there that is
bigger in at least one dimension than the second monitor on the right.

2. Drag the window to the second monitor, and either first drop it there,
and then maximize it (by pushing the window border against the panel (a
correct maximize outline is shown), and let go, or by still dragging the
window push it against the panel (still showing the right maximize outline.

3. Release the mouse button.

The window should now be maximized on the smaller right monitor, but in
fact it maximized on the larger left monitor instead.

On 13 Nov 2012 07:47, "Daniel van Vugt" <email address hidden>
wrote:

> OK, it took me a surprisingly long time to reproduce the problem but now I
> can reproduce it in some unnatural cases:
> (a) The centre of the window is below the bottom of the bottom-most
> monitor (or right of the right-most); or
> (b) The height of the window is greater than the height of the monitor
> it's mostly on (and probably applies to width too).
>
> I still cannot reproduce the bug in any "natural" case where (c) a
> window smaller than the monitor it's on (and centred) fails to maximize
> on that monitor. That's the main case reported at the top of the bug and
> the main case that worries me. I can't reproduce it.
>
> Can anyone reproduce (c) any more or is it just (a) and (b) that are a
> problem?
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (966547).
> https://bugs.launchpad.net/bugs/751605
>
> Title:
> Multi-monitor - Windows maximize on the wrong monitor
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ayatana-design/+bug/751605/+subscriptions
>

Daniel van Vugt (vanvugt) wrote :

wacked_up: That's case (b) I described above and can already reproduce.

Éric Piel (pieleric) wrote :

I don't remember ever encountering case (a), and I use Ubuntu 10 hours every day. I've been using Unity only since 12.04 though. Maybe case (a) has been already fixed since the original report (from 2011-04).

Daniel van Vugt (vanvugt) wrote :

No, cases (a) and (b) I have reproduced with the latest compiz 0.9.9 source.

Éric Piel (pieleric) wrote :

Sorry Daniel, in my comment I meant "case (c)"! I can also reproduce cases (a) and (b) here :-)

Daniel: Case (c) works for me, meaning small windows maximize correctly - it's *not* buggy here.

Regarding (b), it's not just the height that triggers the bug, it's also the width: If any current window dimension doesn't fit onto the selected monitor, it maximizes to the other (larger) one instead.

Changed in compiz:
status: Triaged → In Progress
Thomas Kluyver (takluyver) wrote :

Daniel: my understanding is that case (b) is what we're seeing - I don't think I've seen (c). With two monitors of different size, it's very easy to get a window slightly larger than the smaller one.

Aaron Bentley (abentley) wrote :

I am experiencing b). Like the original reporter, I have a laptop with an external monitor. To reproduce this, all I have to do is drag a window that was sized for the external monitor to the laptop monitor and maximize it.

It's not an unnatural thing to do. I have to work around this bug multiple times a day.

Lalo Martins (lalo.martins) wrote :

Sorry for the noise, but I figured praise-noise is worth it:

It's great to finally see some fixing activity on this bug. Thanks a lot! <3

Paul Sandel (jamespaulsandel) wrote :

I can duplicate with Firefox, and only sometimes, Netbeans. Workaround: Manually resize the window (click and drag the edges) so it is shorter than the smaller monitor, then maximize will land on the monitor you're on... output from xrandr:

Screen 0: minimum 320 x 200, current 3046 x 1050, maximum 8192 x 8192
LVDS1 connected 1366x768+0+0 (normal left inverted right x axis y axis) 344mm x 194mm
   1366x768 60.0*+
   1360x768 59.8 60.0
   1024x768 60.0
   800x600 60.3 56.2
   640x480 59.9
VGA1 connected 1680x1050+1366+0 (normal left inverted right x axis y axis) 474mm x 296mm
   1680x1050 59.9*+
   1680x945 60.0
   1400x1050 60.0
   1600x900 60.0
   1280x1024 75.0 60.0
   1440x900 75.0 59.9
   1280x960 60.0
   1366x768 60.0
   1360x768 60.0
   1280x800 74.9 59.8
   1152x864 75.0
   1280x768 74.9 59.9
   1024x768 75.1 70.1 60.0
   1024x576 60.0
   832x624 74.6
   800x600 72.2 75.0 60.3 56.2
   848x480 60.0
   640x480 72.8 75.0 66.7 60.0
   720x400 70.1
HDMI1 disconnected (normal left inverted right x axis y axis)
DP1 disconnected (normal left inverted right x axis y axis)

Changed in compiz:
status: In Progress → Fix Committed
MC Return (mc-return) wrote :

It is great to see this fixed. Awesome.
A huge improvement for multimonitor users. \o/

Charon (charon030) wrote :

Indeed, it is great to see a fix was committed. Will this fix be backported to compiz 9.7.x for all the Ubuntu 12.04 LTS users out there?

Daniel van Vugt (vanvugt) wrote :

Fix committed into lp:compiz at revision 3471, scheduled for release in Compiz 0.9.9.0

Changed in compiz-core:
milestone: none → 0.9.7.10
status: Triaged → In Progress
assignee: nobody → Charon (charon030)
Changed in compiz-core:
milestone: 0.9.7.10 → 0.9.7.12
Stephen M. Webb (bregma) on 2012-11-22
Changed in compiz (Ubuntu):
milestone: none → ubuntu-13.04-alpha-1
status: Triaged → In Progress
Changed in compiz (Ubuntu):
status: In Progress → Fix Committed
Changed in compiz (Ubuntu):
assignee: nobody → Daniel van Vugt (vanvugt)
Changed in compiz (Ubuntu):
milestone: ubuntu-13.04-alpha-1 → ubuntu-13.04-month-2
Changed in compiz-core:
status: In Progress → Triaged
assignee: Charon (charon030) → nobody
Changed in compiz-core:
milestone: 0.9.7.12 → 0.9.7.14
cometdog (ericctharley) wrote :

Can anyone comment on two things?
1. What is the nature of the fix that was committed? Two proposals have been made. A: maximize window to display containing most of window's area. B: maximize window to display containing mouse. ...I hope the fix was implemented as option B, since that seems more like correct, unsurprising behavior. If someone is clicking on a titlebar button to maximize a window, or dragging a window against the top of the screen to maximize, their attention is on the display containing the mouse; and the window should go there. They are unlikely to know what proportion of the window is on what display. In fact one can easily have the majority of the window on a different display, e.g. in the case of maximizing a window to an external 800x600 projector connected to a 192x1200 laptop.
2. This fix appears to have been committed to compiz 0.9.8.8 SRU-2. Is it possible to determine whether that (or any other version of compiz with the fix) will make it into ubuntu 12.10? I'm never sure how to tell when or if to expect the fix to appear on my machine.

Changed in compiz:
importance: Critical → High
Changed in compiz-core:
importance: Critical → High
Changed in compiz (Ubuntu):
importance: Critical → High
description: updated
Changed in compiz:
status: Fix Committed → Fix Released
Stephen M. Webb (bregma) on 2013-02-05
Changed in compiz (Ubuntu):
status: Fix Committed → Fix Released
cholt45 (cholt45) wrote :

Still present on fully updated ubuntu 12.10. If the window is larger than the monitor resolution it maximizes on the bigger monitor. If I resize the window so it's smaller than the monitor resolution it maximizes corectly. Please fix.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in compiz (Ubuntu Quantal):
status: New → Confirmed
Changed in compiz-core:
assignee: nobody → Charon (charon030)
status: Triaged → In Progress
Changed in compiz-core:
status: In Progress → Fix Committed
Adam Niedling (krychek) wrote :

It's working fine for me in Ubuntu 13.04. I tested Nautilus, Chromium and a terminal window.

Hello karoly.vegh, or anyone else affected,

Accepted compiz into quantal-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/compiz/1:0.9.8.6+bzr3433-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 Quantal):
status: Confirmed → Fix Committed
tags: added: verification-needed

I was not able to reproduce this with a Terminal window, but with firefox I get this strange effect when UNmaximizing a new window.

When I open a new window of firefox, it opens maximized on the attached external monitor. When I click on "UnMaximize", it jumps to the laptop display.
The effect appears only on newly opened firefox windows. Windows that have been 'used' already for resizing, etc. do not have this effect.

mm@musca:~ $ xrandr
Screen 0: minimum 320 x 200, current 1920 x 2250, maximum 8192 x 8192
DVI-0 disconnected (normal left inverted right x axis y axis)
LVDS connected 1680x1050+117+1200 (normal left inverted right x axis y axis) 331mm x 207mm
   1680x1050 60.0*+ 50.0
   1400x1050 60.0
   1280x1024 59.9
   1440x900 59.9
   1280x960 59.9
   1280x854 59.9
   1280x800 59.8
   1280x720 59.9
   1152x768 59.8
   1024x768 59.9
   800x600 59.9
   848x480 59.7
   720x480 59.7
   640x480 59.4
DisplayPort-0 connected 1920x1200+0+0 (normal left inverted right x axis y axis) 518mm x 324mm
   1920x1200 60.0*+
   1920x1080 59.9
   1600x1200 60.0
   1680x1050 60.0
   1280x1024 75.0 72.0 60.0
   1440x900 75.0 59.9
   1024x768 75.1 70.1 60.0
   800x600 72.2 75.0 60.3
   640x480 72.8 75.0 66.0 60.0
   720x400 70.1
VGA-0 disconnected (normal left inverted right x axis y axis)

The external monitor has 1920x1200 pixel and is positioned above the laptop monitor which has 1680x1050 pixel.

danep (danepowell) wrote :

I have this problem in Quantal and want to try the proposed compiz fix in #40. However, when I try to install the quantal/proposed version of compiz using apt or synaptic, it wants to uninstall ubuntu-desktop... obviously not good. How can I get around this conflict?

Timo Jyrinki (timo-jyrinki) wrote :

danep: For testing the proposed update, I'd suggest you try updating only Compiz and not other -proposed packages, maybe there is something broken in the -proposed.

One way to do that (I've found) is to enable proposed, look at Synaptic's upgradeable packages and sort the list by version number - it's easier that way to select all the compiz packages for updating at once, without causing dependency problems. Just scroll through to the around 1:0.9.8.6+bzr3433-0ubuntu1 (note that since there's "1:" it comes after all the non-: version numbers).

To post a comment you must log in.