f50cac3005
When transitioning to or from the overview, windows travel a certain distance between their real desktop position and their place in the overview window grid. The less this travel distance is, the smoother, more polished, and less jarring the overall transition looks. This is why it makes sense to try reordering and repositioning windows to minimize their travel distance. That being said, there are other factors that impact the quality of the overview layout, such as how much the windows get scaled and what portion of the overall available space they take up. The existing code tries to minimize the travel distance by sorting the windows in each row by their horizontal position. There are, however, two problems with this implementation. First, it compares the coordinates of windows' left edges as opposed to their centers, which means it yields unexpected results when a small window is positioned next to the left edge of a large window. Second, it completely disregards vertical coordinates, instead assigning windows to the grid rows using their monotonically increasing window numbers, effectively vertically sorting them by the order they were created in. This commit changes both vertical and horizontal ordering to work based on the coordinates of the geometric centers of the windows. That is to say, windows are first assigned to grid rows based on the vertical coordinates of their centers, and subsequently sorted inside each row based on the horizontal coordinates of said centers. In my testing, this leads to a much more intuitive and visually pleasing window placement. Signed-off-by: Sergey Bugaev <bugaevc@gmail.com> https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/267 |
||
---|---|---|
.gitlab-ci | ||
.settings | ||
data | ||
docs/reference | ||
js | ||
lint | ||
man | ||
meson | ||
po | ||
src | ||
subprojects | ||
test | ||
tests | ||
tools | ||
.eslintrc.json | ||
.gitignore | ||
.gitlab-ci.yml | ||
.gitmodules | ||
cldr2json.py | ||
config.h.meson | ||
COPYING | ||
gnome-shell.doap | ||
HACKING.md | ||
meson_options.txt | ||
meson.build | ||
NEWS | ||
README.md | ||
README.mdwn |
GNOME Shell
GNOME Shell provides core user interface functions for the GNOME 3 desktop, like switching to windows and launching applications. GNOME Shell takes advantage of the capabilities of modern graphics hardware and introduces innovative user interface concepts to provide a visually attractive and easy to use experience.
For more information about GNOME Shell, including instructions on how to build GNOME Shell from source and how to get involved with the project, see the project wiki.
Bugs should be reported to the GNOME bug tracking system.
Contributing
To contribute, open merge requests at https://gitlab.gnome.org/GNOME/gnome-shell.
Commit messages should follow the GNOME commit message guidelines. We require an URL to either an issue or a merge request in each commit.
License
GNOME Shell is distributed under the terms of the GNU General Public License, version 2 or later. See the COPYING file for details.