[overview] Fix positioning of single small windows
A single window that does not need to be scaled down, should be centered and not placed at the bottom. To avoid blurryness window positions should be pixel aligned. https://bugzilla.gnome.org/show_bug.cgi?id=617827
This commit is contained in:
parent
2ca1fe3254
commit
0e9c47bd56
@ -1023,8 +1023,13 @@ Workspace.prototype = {
|
||||
(desiredHeight - buttonOuterHeight - captionHeight) / rect.height,
|
||||
1.0 / this.scale);
|
||||
|
||||
x = xCenter - 0.5 * scale * rect.width;
|
||||
y = y + height - rect.height * scale - captionHeight;
|
||||
x = Math.floor(xCenter - 0.5 * scale * rect.width);
|
||||
|
||||
// We want to center the window in case we have just one
|
||||
if (metaWindow.get_workspace().n_windows == 1)
|
||||
y = Math.floor(yCenter * global.screen_height - 0.5 * scale * rect.height);
|
||||
else
|
||||
y = Math.floor(y + height - rect.height * scale - captionHeight);
|
||||
|
||||
return [x, y, scale];
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user