Bug 1153641

Summary: [multi-head] Window is moved on its own to other screen
Product: Red Hat Enterprise Linux 7 Reporter: Jiri Koten <jkoten>
Component: mutterAssignee: Florian Müllner <fmuellner>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: urgent Docs Contact:
Priority: high    
Version: 7.1CC: adam.winberg, fmuellner, jkoten, ovasik, tpelka, vbenes
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: mutter-3.8.4-15.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-05 13:22:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Screencast
none
Displays settings none

Description Jiri Koten 2014-10-16 12:21:58 UTC
Created attachment 947584 [details]
Screencast

Description of problem:
There is a faulty window placement behaviour which causes windows to move to other screen on their own when using dual-head.

Observed in evolution - editing meeting dialog, firefox - opening new window and gnome-terminal - multiple windows

Haven't seen it in rhel7.0  

Version-Release number of selected component (if applicable):
gnome-shell-3.8.4-41.el7
gtk3-3.8.8-7.el7
mutter-3.8.4-14.el7

How reproducible:
100%

Steps to Reproduce:
1. On the first screen open gnome-terminal
2. Open another window of gnome-terminal
3. Maximize the second window

Actual results:
The second window is maximized but moved to other screen

Expected results:
Window is maximized and stays on the first screen


Additional info:

Comment 2 Florian Müllner 2014-10-20 14:22:55 UTC
I would suspect a regression from bug 1126754 (the monitor handling code the original patch is based on has changed significantly upstream since 3.8), however:

> Steps to Reproduce:
> 1. On the first screen open gnome-terminal
> 2. Open another window of gnome-terminal
> 3. Maximize the second window

I have not been able to reproduce the issue with these instructions. Can you please provide some more information? What monitor layout are you using (primary on the left/right/bottom/top)? How do you maximize (double-click, shortcut, window decoration button)? How do you open the second terminal window?

Comment 3 Jiri Koten 2014-10-20 15:23:38 UTC
(In reply to Florian Müllner from comment #2)
> I have not been able to reproduce the issue with these instructions. Can you
> please provide some more information? What monitor layout are you using
> (primary on the left/right/bottom/top)? How do you maximize (double-click,
> shortcut, window decoration button)? How do you open the second terminal
> window?

I have laptop with two external monitors connected. Laptop lid closed, Primary on the right, secondary screen on the left.

I open two terminals (from the dash) on primary screen and maximize (by shortcut) one of them. It moves left to second screen.

Reproduced in gnome shell and gnome-shell classic - it works with the maximize button too.

Actually the easiest reproducer, I'm seeing now, is open firefox (from dash or menu in classic) - its window blinks on primary and then jumps to second screen.

With fresh user the screens overlap in default configuration and I have to change the display layout - probably another bug. 

xrandr output with fresh user:

$ xrandr -q
Screen 0: minimum 320 x 200, current 1680 x 1200, maximum 8192 x 8192
LVDS-1 unknown connection (normal left inverted right x axis y axis)
   1600x900       60.0 +   40.0  
   1152x864       60.0  
   1024x768       59.9  
   800x600        59.9  
   640x480        59.4  
   720x400        59.6  
   640x400        60.0  
   640x350        59.8  
VGA-1 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 connected primary 1680x1050+0+0 (normal left inverted right x axis y axis) 459mm x 296mm
   1680x1050      59.9*+
   1280x1024      75.0     60.0  
   1280x960       60.0  
   1152x864       75.0  
   1024x768       75.1     70.1     60.0  
   832x624        74.6  
   800x600        72.2     75.0     60.3     56.2  
   640x480        75.0     72.8     66.7     60.0  
   720x400        70.1  
DP-3 connected 1600x1200+0+0 (normal left inverted right x axis y axis) 367mm x 275mm
   1600x1200      60.0*+
   1280x1024      75.0     60.0  
   1152x864       75.0  
   1024x768       75.1     60.0  
   800x600        75.0     60.3  
   640x480        75.0     60.0  
   720x400        70.1

Comment 4 Jiri Koten 2014-10-20 15:26:09 UTC
Created attachment 948607 [details]
Displays settings

My Screen configuration where I'm able to reproduce the bug

$ xrandr -q 
Screen 0: minimum 320 x 200, current 3280 x 1200, maximum 8192 x 8192
LVDS-1 unknown connection (normal left inverted right x axis y axis)
   1600x900       60.0 +   40.0  
   1152x864       60.0  
   1024x768       59.9  
   800x600        59.9  
   640x480        59.4  
   720x400        59.6  
   640x400        60.0  
   640x350        59.8  
VGA-1 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
DP-2 connected primary 1680x1050+1600+150 (normal left inverted right x axis y axis) 459mm x 296mm
   1680x1050      59.9*+
   1280x1024      75.0     60.0  
   1280x960       60.0  
   1152x864       75.0  
   1024x768       75.1     70.1     60.0  
   832x624        74.6  
   800x600        72.2     75.0     60.3     56.2  
   640x480        75.0     72.8     66.7     60.0  
   720x400        70.1  
DP-3 connected 1600x1200+0+0 (normal left inverted right x axis y axis) 367mm x 275mm
   1600x1200      60.0*+
   1280x1024      75.0     60.0  
   1152x864       75.0  
   1024x768       75.1     60.0  
   800x600        75.0     60.3  
   640x480        75.0     60.0  
   720x400        70.1

Comment 5 Tomas Pelka 2014-11-25 13:28:10 UTC
Florian, 

any progress? I can reproduce too with recent gnome-shell.

Thanks
Tom

Comment 6 Florian Müllner 2014-11-28 13:02:30 UTC
No, I have still not been able to reproduce. Maybe that's because I am only testing with laptop + external monitor - does the issue go away for you as well with such a setup?

Comment 7 Jiri Koten 2014-11-28 15:26:11 UTC
(In reply to Florian Müllner from comment #6)
> No, I have still not been able to reproduce. Maybe that's because I am only
> testing with laptop + external monitor - does the issue go away for you as
> well with such a setup?

I'm able to reproduce with just one external display.
Internal laptop screen is primary screen - with the top bar.

Move mouse to external display, open terminal from dash using only the keyboard so the mouse stays put (pressing window key and type "ter"). Maximize the window by pressing F10 - terminal window jumps to primary screen. Seems that moving the window negates the issue.

Move mouse to external display, open firefox from dash - window opens on external display but immediately jumps to primary screen.

Comment 8 Florian Müllner 2014-12-19 23:05:31 UTC
(In reply to Jiri Koten from comment #7)
> Internal laptop screen is primary screen - with the top bar.

Primary still on the right as in comment #3?
(I'm still completely in the dark on this - I still haven't reproduced this with the primary on the left, right, top or bottom)


> Move mouse to external display, open terminal from dash using only the
> keyboard so the mouse stays put (pressing window key and type "ter").
> Maximize the window by pressing F10 - terminal window jumps to primary
> screen.

Assuming F10 should be Alt+F10 (e.g. maximize), then no - still working as expected :-(

Does the same happen if you don't go through the overview, but open a new terminal window via the ctrl+shift+n shortcut? If so, does the problem still happen when you run "mutter --replace" in a terminal (note that you will loose all panels with this - running "gnome-shell --mode=classic --replace" after the test will give you back the interface)

Comment 9 Jiri Koten 2015-01-07 13:18:24 UTC
(In reply to Florian Müllner from comment #8)
> (In reply to Jiri Koten from comment #7)
> > Internal laptop screen is primary screen - with the top bar.
> 
> Primary still on the right as in comment #3?
> (I'm still completely in the dark on this - I still haven't reproduced this
> with the primary on the left, right, top or bottom)
> 

I use fresh user and default display configuration, i.e. primary on the laptop screen, external screen right of primary.

> 
> > Move mouse to external display, open terminal from dash using only the
> > keyboard so the mouse stays put (pressing window key and type "ter").
> > Maximize the window by pressing F10 - terminal window jumps to primary
> > screen.
> 
> Assuming F10 should be Alt+F10 (e.g. maximize), then no - still working as
> expected :-(
>
> Does the same happen if you don't go through the overview, but open a new
> terminal window via the ctrl+shift+n shortcut? 

Best reliable reproducer I have is the one with the firefox new window. Open firefox, move its window to external screen and press Ctrl-N - new window jumps to primary. Happens all the time.  

> If so, does the problem still
> happen when you run "mutter --replace" in a terminal (note that you will
> loose all panels with this - running "gnome-shell --mode=classic --replace"
> after the test will give you back the interface)

I can reproduce it by running just the mutter, mutter-3.8.4-10.el7 is the last good build, mutter-3.8.4-12.el7 is the first bad build.

$ xrander -q
Screen 0: minimum 320 x 200, current 3280 x 1050, maximum 8192 x 8192
LVDS-1 connected 1600x900+0+0 (normal left inverted right x axis y axis) 309mm x 174mm
   1600x900       60.0*+   40.0  
   1152x864       60.0  
   1024x768       59.9  
   800x600        59.9  
   640x480        59.4  
   720x400        59.6  
   640x400        60.0  
   640x350        59.8  
VGA-1 disconnected (normal left inverted right x axis y axis)
DP-1 connected 1680x1050+1600+0 (normal left inverted right x axis y axis) 459mm x 296mm
   1680x1050      59.9*+
   1280x1024      75.0     60.0  
   1280x960       60.0  
   1152x864       75.0  
   1024x768       75.1     70.1     60.0  
   832x624        74.6  
   800x600        72.2     75.0     60.3     56.2  
   640x480        75.0     72.8     66.7     60.0  
   720x400        70.1  
DP-2 disconnected (normal left inverted right x axis y axis)
DP-3 disconnected (normal left inverted right x axis y axis)

Comment 10 Florian Müllner 2015-01-14 11:53:38 UTC
(In reply to Jiri Koten from comment #9)
> I can reproduce it by running just the mutter, mutter-3.8.4-10.el7 is the
> last good build, mutter-3.8.4-12.el7 is the first bad build.

Thanks, this is helpful information - I've now tracked down the issue and will provide a fixed build once we get all the required flags.

Comment 12 Jiri Koten 2015-01-14 17:42:00 UTC
Verified the fix.

Comment 13 Vladimir Benes 2015-01-21 08:18:55 UTC
*** Bug 1184347 has been marked as a duplicate of this bug. ***

Comment 15 errata-xmlrpc 2015-03-05 13:22:01 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-0535.html

Comment 16 Vladimir Benes 2015-03-06 09:27:48 UTC
*** Bug 1199424 has been marked as a duplicate of this bug. ***

Comment 17 Vladimir Benes 2015-03-18 09:59:01 UTC
*** Bug 1199424 has been marked as a duplicate of this bug. ***