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 675703 - Place new windows on the primary monitor if workspaces-only-on-primary is enabled
Place new windows on the primary monitor if workspaces-only-on-primary is ena...
Status: RESOLVED OBSOLETE
Product: mutter
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2012-05-08 19:22 UTC by Florian Müllner
Modified: 2018-01-25 10:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screen: Add get_primary_monitor_info() (1.88 KB, patch)
2012-05-08 19:22 UTC, Florian Müllner
none Details | Review
place: Use primary monitor if workspaces-only-on-primary is enabled (2.44 KB, patch)
2012-05-08 19:22 UTC, Florian Müllner
none Details | Review

Description Florian Müllner 2012-05-08 19:22:50 UTC
See patches and the discussion on the list[0].

[0] http://mail.gnome.org/archives/gnome-shell-list/2012-May/msg00041.html
Comment 1 Florian Müllner 2012-05-08 19:22:52 UTC
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.
Comment 2 Florian Müllner 2012-05-08 19:22:56 UTC
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.
Comment 3 drago01 2012-05-14 19:55:19 UTC
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
Comment 4 Florian Müllner 2012-05-14 20:48:53 UTC
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
Comment 5 Owen Taylor 2012-05-16 19:29:50 UTC
(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?
Comment 6 Owen Taylor 2012-05-21 19:27:16 UTC
(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?
Comment 7 Florian Müllner 2012-05-22 12:51:24 UTC
(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?
Comment 8 Jonas Ådahl 2018-01-25 09:34:35 UTC
Do we still want this?
Comment 9 Florian Müllner 2018-01-25 10:32:26 UTC
Let's say we don't ...