← Back to team overview

unity-design team mailing list archive

Remember window positions

 

This is regarding https://bugs.launchpad.net/ubuntu/+source/metacity/+bug/124315

>Won't Fix in papercuts , but is tagged "ayatana" to be overseen in Ayatana project

Any update on this?

I don't think it's necessary to argue why this functionality is so
important and there is no point in arguing about who's job it is at
this stage. Ubuntu ships with Unity (and is its upstream!) and
applications such as Firefox that don't remember their position on
their own. Ubuntu should do it even if no other
GNOME/metacity/mutter/compiz based desktop does it. Makes for a good
bullet-point in a GNOME3 comparison ;)

I know about the window placement plugin in CCSM but there are two problems:
It requires manual setup and can only do static coordinates and rules
whereas it should be enabled by default, transparent and dynamically
remember positions.
Secondly, it's broken. Opening another window of the same
class/role/whatever shouldn't put it exactly on top of the other one
but cascaded so both titlebars are visible. See KDE, Windows and OS X
for a correct implementation. Besides usability reasons, amplified by
the "missing" taskbar, this also has aesthetic implications when
shadows are used: open 3 or more windows and the shadow around them
will get almost black and look really ugly.
Also it seems currently the "grabber" doesn't really work.

Just in case someone would like to point me at devilspie, it got
exactly the same problems plus another one:
It moves windows after they have been put by the WM and were already
drawn onto the desktop, resulting in some nasty flickering.

My recommendation for the near future: Extend the window placement
plugin so it supports cascading (or "smart" placement, see below) of
same windows and automatically remembers coordinates. Once it's deemed
stable and functionally complete make enabled by default.

A remaining questions is if all windows should remember their position
by default. The "smart" placement currently in place has certainly
benefits especially when it comes to applications with many windows
which users want to have visible side by side (Terminal and Nautilus
mainly).

I have a new idea for such applications:
Given the application centric paradigm of Unity (see my last post in
the mailing list) the tiling/non-overlapping window placement could
calculate free space only based within an application abstracting away
windows of other applications behind it as if ever app was on its own
workspace. Click on the launcher icon and all windows of a particular
application go to the foreground.
I'm not sure how this would work out in practice, I guess extended
usability testing would be required. As I wrote in that post I'm no
fan of the app-centric paradigm but in case the majority of users
prefer it to the window-centric paradigm this new "smart" placement
mode could make sense. Imagine the user-case of file management via
drag and drop between multiple nautilus windows. This nicely could
merge the advantages of floating and tiling WMs.

This brings us to another question, how do we determine the placement
of the "first window" of an application: Say the user opens two
windows of the same application and class side by side. One she
considers to be the primary, the other is just temporary. She might
close either of them first so how should we know what she wants?

Two solutions come to my mind: Put it at the position of the last
closed window. It's simple and I think both Windows and OS X do that
but from my personal experience it's not ideal. I much prefer this
one: always open in the same order, if the user puts the very first
window in the left upper corner, new windows will be arranged left to
right, top to bottom. If the user puts it into the lower right it will
go from right to left and bottom to top, after closing all windows of
the application it will start again either top left or bottom right.
I think this elegantly merges smart window placement and the remember
position placement: The first window always opens at a predictable
position, subsequent windows are either cascaded or put next to it in
a non-overlapping manner depending on size of the windows and
remaining free space of the screen.

One thing to note, the OS X filemanager remembers position of each
folder independently, the Windows filemanager remembers just one
position no matter which folder you open. I much prefer OS X in this
regards. With Terminals I think both always cascade. If the user
doesn't manually rearrange windows it doesn't really matter which one
is closed the last because the positions aren't far of from each other
even when opening many windows (=number of windows times height of the
title bar). In a "smart" window placement mode however the difference
will be huge with the second window already. When using that mode my
solution is much more predictable and that's what essentially this
whole thing is about.

Hope that makes sense, please ask if anything is unclear.



Follow ups