After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 636963 - Vertically stacked monitor setups broken
Vertically stacked monitor setups broken
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: message-tray
unspecified
Other Linux
: Normal minor
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 646853 647274 648370 648617 648647 phantom-boundary 652432 653098 653413 653515 654561 668129 (view as bug list)
Depends on:
Blocks: 645023
 
 
Reported: 2010-12-10 14:22 UTC by Leon Handreke
Modified: 2012-08-07 10:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
layout: new file handling shell layout (39.68 KB, patch)
2011-06-14 16:52 UTC, Dan Winship
needs-work Details | Review
layout: deal better with vertically-stacked monitors (4.52 KB, patch)
2011-06-14 16:52 UTC, Dan Winship
reviewed Details | Review
panel: pass the Panel object to the PanelCorners (2.54 KB, patch)
2011-06-28 15:03 UTC, Dan Winship
committed Details | Review
layout: new file handling shell layout (37.34 KB, patch)
2011-06-28 15:04 UTC, Dan Winship
committed Details | Review
layout: deal better with vertically-stacked monitors (4.96 KB, patch)
2011-06-28 15:05 UTC, Dan Winship
committed Details | Review

Description Leon Handreke 2010-12-10 14:22:55 UTC
On multi-monitor configurations where the main monitor is at the top, hiding the message tray currently just moves it to the top of the bottom screen.

The message tray should hide properly and only appear when the mouse is moved to the bottom right of the main monitor.

I admit this configuration is somewhat crazy, but I've met somebody actually using this who was annoyed by this bug, so I'm reporting it.
Comment 1 Alexander Larsson 2011-03-18 12:47:46 UTC
We have several problems with vertical setups:

* message tray for monitors under primary
* panel for monitors above primary
* any monitor above another => maximize by drag-to-top broken

At the moment we're focusing on fixing side-by-side multihead though.
Comment 2 Izhar Firdaus 2011-03-31 14:39:51 UTC
another bug related to vertical setup.

I'm using a vertical setup where a laptop is beneath a large monitor.

On a setup where the primary monitor is the laptop's, drag and drop on the large monitor is broken. The window goes jumpy as if theres something blocking it from entering the center of the larger screen. 

recording of the issue: http://www.youtube.com/watch?v=tcoOoFJlShg
Comment 3 Owen Taylor 2011-04-05 19:41:57 UTC
*** Bug 646853 has been marked as a duplicate of this bug. ***
Comment 4 Nathan Acks 2011-04-06 16:15:40 UTC
Not exactly a "me too" comment, but a justification for why vertical stacking is important:

Some chipsets have only a limited area available for 3D acceleration (see bug #645087). Unless there are plans to make gnome-shell function in an unaccelerated environment (which would, IMHO, improve usability, since one does not expect to loose functionality when plugging in a second monitor), the only choice for those of us with these chipsets who wish to use gnome-shell is to switch to a vertical-stacking mode (at least so long as the sum of our monitors' vertical spans remains within the accelerated area).
Comment 5 Florian Müllner 2011-04-09 16:27:36 UTC
*** Bug 647274 has been marked as a duplicate of this bug. ***
Comment 6 Owen Taylor 2011-04-21 13:22:35 UTC

*** This bug has been marked as a duplicate of bug 648370 ***
Comment 7 Owen Taylor 2011-04-21 13:26:07 UTC
Accidentally marked the duplicate the wrong way
Comment 8 Owen Taylor 2011-04-21 13:27:27 UTC
*** Bug 648370 has been marked as a duplicate of this bug. ***
Comment 9 Jasper St. Pierre (not reading bugmail) 2011-04-25 14:52:02 UTC
*** Bug 648617 has been marked as a duplicate of this bug. ***
Comment 10 Rui Matos 2011-04-25 22:21:29 UTC
*** Bug 648647 has been marked as a duplicate of this bug. ***
Comment 11 Dan Winship 2011-05-03 15:21:38 UTC
The simplest fix might be:

    - If there are monitors above the monitor that is supposed to be
      primary, then reassign primary status to the top-most monitor
      above the original primary.

    - If there are monitors below the primary, then put the message tray
      on the bottom-most monitor below the primary

I don't think there are any real problems with moving the message tray off the primary monitor. But moving the panel without moving "primary" with it would be weird, since it would mean that when you clicked the Activities button on the top monitor, it would activate the overview on the bottom/middle monitor, which would be weird.
Comment 12 Rui Matos 2011-06-05 11:37:27 UTC
*** Bug 651907 has been marked as a duplicate of this bug. ***
Comment 13 William Jon McCann 2011-06-07 18:50:39 UTC
The original intent was to attempt to use the top left monitor for the primary unless the user overrides it.
Comment 14 Tomasz Torcz 2011-06-13 08:22:10 UTC
Also, "hidden" notification bar on lower monitor hijacks clicks on upper 1cm of lower monitor.
Comment 15 Rui Matos 2011-06-13 09:17:42 UTC
*** Bug 652432 has been marked as a duplicate of this bug. ***
Comment 16 Dan Winship 2011-06-14 16:52:20 UTC
Created attachment 189924 [details] [review]
layout: new file handling shell layout

Remove ShellGlobal's monitor-related methods, and have
Main.layoutManager provide that information instead. Move
Main._relayout() to LayoutManager, and have other objects connect to
the layout manager's 'monitors-changed' signal to know when the screen
geometry has changed.
Comment 17 Dan Winship 2011-06-14 16:52:24 UTC
Created attachment 189925 [details] [review]
layout: deal better with vertically-stacked monitors

If there is a monitor above the "primary" monitor, then make the
topmost monitor be the primary. Likewise, figure out which monitor is
the bottom-most monitor below the primary monitor, and put the message
tray there, rather than necessarily on the primary.
Comment 18 Dan Winship 2011-06-14 16:55:55 UTC
FYI, the other inspiration for this patchset was getting the overview to not draw over the on-screen keyboard. I have further patches to have the LayoutManager keeping track of the "content area" based on whether or not the keyboard is displaying at the bottom of the screen.
Comment 19 Jasper St. Pierre (not reading bugmail) 2011-06-21 11:41:29 UTC
*** Bug 653098 has been marked as a duplicate of this bug. ***
Comment 20 Jasper St. Pierre (not reading bugmail) 2011-06-26 00:58:56 UTC
*** Bug 653413 has been marked as a duplicate of this bug. ***
Comment 21 Jasper St. Pierre (not reading bugmail) 2011-06-27 17:33:43 UTC
*** Bug 653515 has been marked as a duplicate of this bug. ***
Comment 22 Florian Müllner 2011-06-27 23:35:31 UTC
Review of attachment 189924 [details] [review]:

Looks good except for _isAboveOrBelow(), which doesn't look like it'll work as advertised.

::: js/ui/layout.js
@@ +14,3 @@
+LayoutManager.prototype = {
+    _init: function () {
+        this._rtl = (St.Widget.get_default_direction() == St.TextDirection.RTL);

Do we care about direction changes?
(probably not, as right now it'd require calling St.Widget.set_default_direction() directly, and for locale-switching from g-c-c to work there are a bunch of more important bits missing anyway ...)

@@ +23,3 @@
+    },
+
+    init: function() {

I assume the _init/init split is to access Main.panel in _updateHotCorners without relying on the order in which objects are initialized in main()? Makes sense, but could probably use a small comment.

@@ +101,3 @@
+    },
+
+    _isAboveOrBelowPrimary: function(monitor) {

Looks like it belongs in the next patch.

@@ +109,3 @@
+        } else {
+            if (monitor.x == primary.x)
+                return true;

I'll be honest, I don't really understand this function - so if the left edges align, the monitor is "above or below" the primary, but not if the right edges align (vice-versa for RTL)? Why?

@@ +114,3 @@
+        if (monitor.x <= primary.x &&
+            (monitor.x + monitor.width) >= (primary.x + primary.width))
+            return true;

And when the monitor happens to be smaller than the primary? Don't we miss a case like

--------
|
|  p r i m a r y
|___________________|
  |
  |  o t h e r 
  |______________|

::: js/ui/panel.js
@@ +548,2 @@
+function PanelCorner(panel, side) {
+    this._init(panel, side);

I don't quite see how that change relates to the rest of the patch. Is it really necessary or should it better be split out?
Comment 23 Florian Müllner 2011-06-27 23:35:45 UTC
Review of attachment 189925 [details] [review]:

Looks good (but _isAboveOrBelowPrimary() should be moved here)
Comment 24 Dan Winship 2011-06-28 00:11:33 UTC
(In reply to comment #22)
> +        this._rtl = (St.Widget.get_default_direction() ==
> St.TextDirection.RTL);
> 
> Do we care about direction changes?
> (probably not, as right now it'd require calling
> St.Widget.set_default_direction() directly

Well, environment.js says:

    // Set the default direction for St widgets (this needs to be done before any use of St)
    if (Gtk.Widget.get_default_direction() == Gtk.TextDirection.RTL) {
        St.Widget.set_default_direction(St.TextDirection.RTL);
    }

although st_widget_set_default_direction() itself doesn't have that same warning. But yeah, it's assumed that this does not change. (I don't think there's any way to change the locale in the UI that would be less work to implement than "save state and restart" would be.)

> I'll be honest, I don't really understand this function - so if the left edges
> align, the monitor is "above or below" the primary, but not if the right edges
> align (vice-versa for RTL)? Why?

Hm... I had some reason for this, but I don't remember now. I guess I'll change it so that if there's any horizontal overlap they're considered stacked.

> +function PanelCorner(panel, side) {
> +    this._init(panel, side);
> 
> I don't quite see how that change relates to the rest of the patch. Is it
> really necessary or should it better be split out?

Previously, Main.start() created the panel, and then later called Main._relayout(), which would set the initial panel size and position. Now, the panel lays itself out at the end of its _init(). Which means that PanelCorner cannot refer to Main.panel when it's being laid out for the first time, because that hasn't been set yet.

It could be split out anyway though, since it's silly for PanelCorner to be referring to its parent via someone else's global variable anyway.
Comment 25 Florian Müllner 2011-06-28 12:03:26 UTC
(In reply to comment #24)
> (In reply to comment #22)
> > Do we care about direction changes?
> [...]
> yeah, it's assumed that this does not change.

OK with me. The UI in control center currently requires a logout anyway, and to make it work differently there are much more challenging problems to solve (particularly on the gtk+ side) ...


> > I'll be honest, I don't really understand this function - so if the left edges
> > align, the monitor is "above or below" the primary, but not if the right edges
> > align (vice-versa for RTL)? Why?
> 
> Hm... I had some reason for this, but I don't remember now. I guess I'll change
> it so that if there's any horizontal overlap they're considered stacked.

Sounds good!


> [...]
> It could be split out anyway though, since it's silly for PanelCorner to be
> referring to its parent via someone else's global variable anyway.

Ah, OK. Up to you whether to split it out then (and yes, it's silly ...)
Comment 26 Dan Winship 2011-06-28 15:03:59 UTC
Created attachment 190872 [details] [review]
panel: pass the Panel object to the PanelCorners

rather than having them refer to it via Main.panel
Comment 27 Dan Winship 2011-06-28 15:04:09 UTC
Created attachment 190873 [details] [review]
layout: new file handling shell layout

Remove ShellGlobal's monitor-related methods, and have
Main.layoutManager provide that information instead. Move
Main._relayout() to LayoutManager, and have other objects connect to
the layout manager's 'monitors-changed' signal to know when the screen
geometry has changed.
Comment 28 Dan Winship 2011-06-28 15:05:36 UTC
Created attachment 190874 [details] [review]
layout: deal better with vertically-stacked monitors

If there is a monitor below the primary monitor, then put the message
tray there, rather than necessarily on the primary.

=====

Matthias pointed out that if we want to enforce "primary must be on top",
then we should do that in the control center, or else the panel will be
shown on the wrong monitor there. So the updated patch only does the
"move message tray to bottom" part. (And if people complain "it's weird
when there's another monitor above the primary monitor", we can just
tell them, "don't do that then".)
Comment 29 Florian Müllner 2011-06-28 15:35:28 UTC
Review of attachment 190873 [details] [review]:

Looks good
Comment 30 Florian Müllner 2011-06-28 15:35:33 UTC
Review of attachment 190874 [details] [review]:

Looks good; the commit message could mention the rationale for the change though ...
Comment 31 Florian Müllner 2011-06-28 15:35:37 UTC
Review of attachment 190872 [details] [review]:

Looks good.
Comment 32 Matthias Clasen 2011-07-06 11:38:23 UTC
Alex is out on vacation until guadec; somebody else should probably take care of committing the accepted-commit-now patches in the meantime.
Comment 33 Florian Müllner 2011-07-06 12:06:43 UTC
(In reply to comment #32)
> Alex is out on vacation until guadec; somebody else should probably take care
> of committing the accepted-commit-now patches in the meantime.

Dan wrote the patches and he's around, isn't he?
Comment 34 Dan Winship 2011-07-06 12:40:58 UTC
oops, missed that these had been re-reviewed

Attachment 190872 [details] pushed as ae35d0e - panel: pass the Panel object to the PanelCorners
Attachment 190873 [details] pushed as 64b2b4a - layout: new file handling shell layout
Attachment 190874 [details] pushed as 1dfffdb - layout: deal better with vertically-stacked monitors
Comment 35 Jasper St. Pierre (not reading bugmail) 2011-07-13 15:37:25 UTC
*** Bug 654561 has been marked as a duplicate of this bug. ***
Comment 36 Florian Müllner 2012-01-17 19:34:33 UTC
*** Bug 668129 has been marked as a duplicate of this bug. ***