Center windows by default?

We are at it… :stuck_out_tongue_winking_eye:

https://gitlab.gnome.org/GNOME/mutter/issues/246

(Note: I am not affiliated with GNOME.)


BTW in general this is hard to decide (in your poll) what is better without seeing it in a GIF or trying it yourself.

About this “smart placement”: Is this actually upstream GNOME behavior when a “Center new windows” is disabled or what?

Because in my testing I’ve never seen that and I still think and see that GNOME just opens windows at 0,0 if “Center new windows” is disabled; or stacks them up if you open multiple ones of the same type e.g.:
image

1 Like

The above screenshot is a little misleading because that behaviour will only be seen for large windows or small screens. But it’s a problem I have already proposed a compromise for both here above and upstream.

Centering tends to hide windows, I would say it kinda maximizes window overlapping. And there is very little to be gained in a reasonably sized screen. And when there is, you can easily drag a window to the position you want. And when you don’t want to do that, there is Tweaks. And still there is dconf-editor. And I wouldn’t be much surprised if, at some point in the future, Gnome removed this centering feature altogether. So it’s better not to rely on it, specially if you’re maintaining Ubuntu.

2 Likes

I believe we should consider the most likely workflow. I have no data to bake this consideration, it’s purely intuitive, but I believe that most of the people open a window to work on it right away, while a minor (not necessarily small) fraction of people open a window to move it in a corner/side of the screen. This is why centering looks the best default and for the latter fraction, improving shortcut for moving/tiling window is probably the most successful way to go.
Regarding future developments, unless there’s already a plan to remove this feature from GNOME, I would not reject it only because it can be removed.

3 Likes

Yeah, I agree — I didn’t think I’d like the left corner opening, but after using for a month, I kind of like it. The centre option, did obscure open windows from time to time. Bit of a minor annoyance, but still, annoying.

Maybe offer this as a user option, by default open as now, but optionally open in the centre - Much like the ‘Attach Modal Dialogues’ option in Tweak Tool?

3 Likes

Sometimes a minor problem can be illuminating. My quest for this little thing showed a lot of the (old) Linux’s flaws.
I recently installed Ubuntu Studio 19, after Mint 17 went eol and installing Mint Mate 18 and installing Ubuntu Mate 19.
The “always open first app in the upper left” got old fast. I went out to find out how to fix it. Maybe center?

After an hour of of expert “fixes”, none of which worked, (I figured Ubuntu studio would be a little different, but this is ridiculous). On the flip side of that is that nobody talked about -geometry or any other old school fixes for this problem. Probably because everybody seems to like to re-invent the wheel. The -geometry idea worked with xterm, but the xfce4-terminal had to change it to --geometry= for whatever reason. Etc, etc… Standards? What standards?

How about the time honored tradition of an app saving x-y-w-h on exit and then sizing and moving the window to that x-y-w-h upon starting? Most people like things to be where they put them the last time they had them.

Having an algorithm pick window placement would be fine if algorithms used computers. People are all different.

2 Likes

I probably should first point out, as a parenthesis, that I’m very new to Ubuntu, and only ended up here exactly because I was trying to find out if I can tell Ubuntu where I want my windows to open. So far I’m really enjoying Ubuntu – having been a user of Windows forever, finally got tired of all their crap and found out there are alternatives!
The only thing so far that is getting to me a bit is exactly the fact that – as opposed to a recent improvement on Windows 10 – Ubuntu doesn’t seem to remember where I place my Windows.
Our screen is a somewhat big 4k TV that, because we’re on a budget, we use for both this PC and, of course as our TV. But, because it’s huge, it’s rather somewhat “neck-straining” when my Windows open anywhere but at the very bottom of the screen. With Windows I just bring the windows of any programs down where I’d want them, and they’ll forever open there, even after startup, that is, until another one of their stupid updates comes through, which always, far from the promised smooth improvements, always changes and messes up everything.

As an average user who doesn’t know much how to use terminal or anything a little more complicated than settings, I’d like to either have an option in said Settings to tell Ubuntu where I’d want my Windows by default (please, including the bottom of the screen!!) or that Ubuntu would remember where I placed them last, and not “forget” it when I next startup…

As a side comment, I’m so far really happy with Ubuntu, actually considering installing it even in our other old PCs as well. They simply seem to go so much faster with it!!!

2 Likes

As an end-user, I would say centering windows upon a program’s first start would be a welcome improvement.

2 Likes

Initial window placement decisions depend a lot on the user’s workflow intents for that application. E.g. a terminal window may make sense to open centered, but a music player or chat app is probably going to intend to go to the side. The number and resolution scale of the user’s monitor(s) also plays a role.

Saving position and restoring at that position is a common convention a lot of apps use. AFAICT this is a per-app behavior (at least for GNOME apps). However even this is unreliable particularly for apps you launch a lot of windows for - e.g. web browsers and (for me) terminals.

I’ve used devilspie2 to enforce some control over my window positions. Essentially it matches against application names or window titles, and then can apply window settings, geometries, etc. according to a Lua config script you provide. This does what I need to put hexchat, irc, terminator, and other basic things onto the right monitors and in the right places, but I haven’t figured out how to get it to put firefox/chromium windows where I want them. And yes, it’s way too fiddly for a general user, but I do think this is the level you have to get to for properly solving this problem, as it’s not a simple one. I’m very glad to see people thinking about it though.

I think this makes sense. The first one opens in the center and then the succeeding windows opens slightly different than the first one.

I’d like to point out that it is not possible for windows to center themselves when one’s running under wayland. This breaks wayland native apps that expect windows to be centered upon launch, like for instance Ulauncher.