GNOME Bugzilla – Bug 675703
Place new windows on the primary monitor if workspaces-only-on-primary is enabled
Last modified: 2018-01-25 10:32:26 UTC
See patches and the discussion on the list[0]. [0] http://mail.gnome.org/archives/gnome-shell-list/2012-May/msg00041.html
Created attachment 213697 [details] [review] screen: Add get_primary_monitor_info() While it is possible to get the monitor info for the primary monitor, it requires jumping through quite some hoops (which didn't matter so far, as we didn't need the functionality). Add a simple function which directly returns the corresponding monitor info.
Created attachment 213698 [details] [review] place: Use primary monitor if workspaces-only-on-primary is enabled Currently windows are placed on the monitor that has the pointer. However if workspaces-only-on-primary is enabled, non-primary monitors tend to function as output devices rather than additional work space (pun intended). It doesn't appear too useful to open windows on non-primary monitors automatically in that case, so always pick the primary monitor for window placement if workspaces-only-on-primary is enabled.
I tend to agree with Alex [1] here (even though the patches make it behave better then the pointer approach). 1: https://mail.gnome.org/archives/gnome-shell-list/2012-May/msg00056.html
Note that the patch does not *always* enforce placement on the primary monitor, but only when the window does not specify a particular geometry. Though admittedly dragging a launcher to a secondary monitor proofs rather flaky in testing: nautilus : works with and without patch gnome-terminal : only works without patch gnome-documents: works neither with or without patch
(In reply to comment #4) > Note that the patch does not *always* enforce placement on the primary monitor, > but only when the window does not specify a particular geometry. Though > admittedly dragging a launcher to a secondary monitor proofs rather flaky in > testing: > > nautilus : works with and without patch > gnome-terminal : only works without patch > gnome-documents: works neither with or without patch Is there an explanation of these results?
(In reply to comment #5) > > nautilus : works with and without patch > > gnome-terminal : only works without patch > > gnome-documents: works neither with or without patch > > Is there an explanation of these results? ping?
(In reply to comment #6) > (In reply to comment #5) > > Is there an explanation of these results? > > ping? Sorry, I didn't look into it in detail until today: > > > gnome-terminal : only works without patch gnome-terminal sets size hints, but doesn't request any particular position, so we pick the default placement (w/o patch: monitor with pointer; w/ patch: primary monitor). > > > nautilus : works with and without patch > > > gnome-documents: works neither with or without patch Those results were actually wrong (except for the fact that the patch doesn't make a difference). Both apps request a position for new windows, so they open on the monitor corresponding to the saved position. So in the first case, the patch is clearly a step back (it may be coincidental that it worked as expected, but it *did* work as expected), while the second case is just broken. We should be able to fix both cases by adding monitor handling to startup notification (as is already the case for workspaces) - just do it?
Do we still want this?
Let's say we don't ...