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 646629 - place new windows at center of screen
place new windows at center of screen
Status: RESOLVED OBSOLETE
Product: mutter
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
: 653920 663163 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-04-03 16:21 UTC by Adam Dingle
Modified: 2018-01-25 09:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch: always center new windows (14.21 KB, patch)
2011-04-03 16:34 UTC, Adam Dingle
rejected Details | Review
patch to always center new windows (14.26 KB, patch)
2012-03-31 00:24 UTC, Adam Dingle
none Details | Review

Description Adam Dingle 2011-04-03 16:21:11 UTC
Metacity has historically used various heuristics to try to place new windows in unused portions of the display.  I personally find that this works poorly and would prefer that all new windows be centered.

This subject has been controversial in the past; see the long debate in Metacity bug 151818, which was ultimately marked WONTFIX several years ago.  But that was some time ago, and Mutter has forked and could behave differently.  I asked about this on the GNOME Shell mailing list (http://mail.gnome.org/archives/gnome-shell-list/2011-April/msg00010.html) and William Jon McCann suggested we open a new bug, so here it is.

We need to decide which of these behaviors we want:

1. Always center all the time.
2. Use the existing heuristics by default, but provide a preference in System Settings that lets the user choose window centering.
3. Use the existing heuristics by default, but provide a GSettings key that enables window centering.
Comment 1 Adam Dingle 2011-04-03 16:34:03 UTC
Created attachment 185039 [details] [review]
patch: always center new windows

Here's a patch that implements behavior 1 (center all the time).
Comment 2 Colin Walters 2011-04-05 14:54:20 UTC
A lot of things have changed since GNOME 2 here:

* We're application based
* There are no desktop icons

Just scanning the old bug.  I think what is most useful would be to identify cases where the current algorithm is suboptimal.
Comment 3 Adam Dingle 2011-04-06 14:42:16 UTC
Well, in my own view the current algorithm is suboptimal in all cases in which it does not simply center the new window.  :)

If the screen is empty, I think it's sort of self-evident that a new window should be centered.  If there are already windows on it, I think it will be relatively rare that a new window can be placed somewhere where it won't at least partially obstruct something, especially since GNOME Shell discourages minimizing windows so people may have relatively many of them open.  We could try to be fancy and try to figure out what to obstruct and what not to obstruct, and then create a new window off to the side somewhere and hope that the user is happy using it there out of the center of the field of their vision.  Or we could simply center the new window.  :)

Of the core mutter maintainers who can reasonably make a decision here, is there anyone who would *not* want their new windows centered?  If so, can they at least vaguely describe what sort of heuristic they might prefer?
Comment 4 Owen Taylor 2011-05-17 18:47:47 UTC
Review of attachment 185039 [details] [review]:

Not going to apply this patch. Marking rejected to get off the review list.
Comment 5 Sean Seago 2011-06-28 19:42:43 UTC
(In reply to comment #4)
> Review of attachment 185039 [details] [review]:
> 
> Not going to apply this patch. Marking rejected to get off the review list.

Sorry to butt in after over a month of silence...I'm just Joe User and I was trying desperately to find a way to have windows centered.  I don't mind digging through settings to make it happen, but I do NOT want to compile anything if it's avoidable.

Coming from Ubuntu with Compiz love to Fedora 15 with no Compiz at all.  Previously used Compiz to center the windows as they were opened.  90% of the time, I never moved them because I don't want to be distracted (the whole point of the design of GNOME 3)...so I was surprised this feature isn't present.  If I intend to do massive mult-tasking, I use a multi-monitor workstation which I will admit sees the benefit of an object avoidance algorithm.  However, on single monitor systems (especially displays smaller than 1920x1080 or smaller than 20 inches regardless of resolution) I find such an algorithm to result in a cluttered desktop which encourages confusion after hours of use.

It is a fact that multitasking reduces the quality of work.  It is also a fact that multitasking is a business mandate far more often than not.  GNOME 3's over-all design with automatically centered windows provides that happy medium where one can stay focused on a central item and respond to events as they happen (if one isn't so in-the-zone that these events aren't noticed).

I won't pretend to know how this patch does what it does, but as a User, I would like clarification on whether or not this feature is being considered.  I hope my plea has been heard by someone.
Comment 6 Rui Matos 2011-07-04 10:25:18 UTC
*** Bug 653920 has been marked as a duplicate of this bug. ***
Comment 7 Albert Hopkins 2011-09-29 12:25:56 UTC
The patch no longer applies with GNOME 3.2 (mutter 3.2.0). Does anyone know if there is a new patch?
Comment 8 Rui Matos 2011-11-01 20:35:45 UTC
*** Bug 663163 has been marked as a duplicate of this bug. ***
Comment 9 Pelle K 2011-12-06 00:43:10 UTC
(In reply to comment #3)
> Well, in my own view the current algorithm is suboptimal in all cases in which
> it does not simply center the new window.  :)
> 
> If the screen is empty, I think it's sort of self-evident that a new window
> should be centered.  If there are already windows on it, I think it will be
> relatively rare that a new window can be placed somewhere where it won't at
> least partially obstruct something, especially since GNOME Shell discourages
> minimizing windows so people may have relatively many of them open.  We could
> try to be fancy and try to figure out what to obstruct and what not to
> obstruct, and then create a new window off to the side somewhere and hope that
> the user is happy using it there out of the center of the field of their
> vision.  Or we could simply center the new window.  :)

Placing windows in a manner that doesn't use all available space that is left on the screen in the most effective manner is very distracting, to me at least. I turn my head for application switching. Well, not really. Rather, my eyeballs is my application switcher. I don't mind the overlapping of windows at all.


(In reply to comment #5)
> Coming from Ubuntu with Compiz love to Fedora 15 with no Compiz at all. 
> Previously used Compiz to center the windows as they were opened.  90% of the
> time, I never moved them because I don't want to be distracted (the whole point
> of the design of GNOME 3)...so I was surprised this feature isn't present.  If
> I intend to do massive mult-tasking, I use a multi-monitor workstation which I
> will admit sees the benefit of an object avoidance algorithm.  However, on
> single monitor systems (especially displays smaller than 1920x1080 or smaller
> than 20 inches regardless of resolution) I find such an algorithm to result in
> a cluttered desktop which encourages confusion after hours of use.
> 
> It is a fact that multitasking reduces the quality of work.  It is also a fact
> that multitasking is a business mandate far more often than not.  GNOME 3's
> over-all design with automatically centered windows provides that happy medium
> where one can stay focused on a central item and respond to events as they
> happen (if one isn't so in-the-zone that these events aren't noticed).

I also miss the window placement configuration options of compiz, however, in my case i miss the strict "smart" mode in compiz, always placing windows in the most unused areas of the screen. While it may be true that multitasking reduces the quality of work, i rarely work with only one application at a time. One might argue that that is what window tiling is for (the built in left/right), but manual tiling is sub-optimal, because it forces me to think on matters that shouldn't concern me when i'm working (multitasking), and it also restricts them to a certain size.
I won't get into an argumentation on which mode is best, because we all know that is purely subjective, and probably depends on the type of work, what workflow, and what type of personality one has.

I think we all can agree that it would be nice if mutter supported the most popular modes of operation today;
* the current centering/smart/cascading mode that mutter currently does for all the gnome-heads out there
* strict centering (always)
* strict "smart" mode (always, as compiz does it)

Personally, i would argue that the time of free form floating windows is over, and perhaps a simplistic fullscreen/tiling window manager or such would be the "way of the future", but i digress...
Comment 10 Saurav Sengupta 2012-01-22 18:27:02 UTC
I have also been looking for a way to centre windows in GNOME Shell. This should at least be provided as a setting (even if it is hidden away in dconf) because the capability is important for users like me. When new windows do not appear at the centre by default, the result looks bad in situations like a child 'Downloads' window opening in a corner from a maximised Firefox window on selecting a file to download. There are other, similar cases, including the important terminal window which, if the monospace font is set to a size below 11pt, opens to one side of the screen instead of appearing in the centre. Same with Totem, etc. Alternatively, the last position of all previously opened windows could be saved and then restored on subsequent use.
Comment 11 Saurav Sengupta 2012-03-30 22:15:03 UTC
@Adam Dingle: Can you provide a 64-bit binary (RPM if packaged) implementing your patch? It has been so long I have been wanting this behaviour, but I don't have a build environment.
Comment 12 Adam Dingle 2012-03-31 00:24:50 UTC
Created attachment 211006 [details] [review]
patch to always center new windows

By popular demand, here's an updated version of my patch that centers new windows all the time.  It will apply to a current mutter (3.4.0).
Comment 13 Adam Dingle 2012-03-31 00:35:48 UTC
@Saurav: I'm not really in the business of providing binary packages, but building and installing should be this easy, approximately, on a Fedora machine:

# Allow the system to find libraries in /usr/local.
$ sudo sh -c 'echo /usr/local/lib > /etc/ld.so.conf.d/local.conf'

$ sudo yum-builddep mutter
$ rpm -q mutter  # to see which version you have
$ wget http://ftp.gnome.org/pub/GNOME/sources/mutter/3.4/mutter-3.4.0.tar.xz  # or other matching version
$ tar xfJ mutter*.xz
$ cd mutter*
$ patch -p1 < 0001-Always-centernewwindows.patch  # the new version I just attached
$ ./configure
$ make
$ sudo make install
$ sudo ldconfig
# now log out and log back in
Comment 14 Jonas Ådahl 2018-01-25 09:16:22 UTC
Always positioning in the center doesn't sound like what we want. Anyway, alternative window positioning semantics can be added as gnome-shell extensions, so closing this as obsolete.