osdWindow: always round-up sizes when updating allocation

This fixes the OSD window flickering horizontally at certain
resolutions.

https://bugzilla.gnome.org/show_bug.cgi?id=772287
This commit is contained in:
Cosimo Cecchi 2016-10-10 16:59:31 -07:00
parent 4670db6629
commit f819654ec8

View File

@ -72,8 +72,8 @@ const OsdWindowConstraint = new Lang.Class({
// Recenter
let [x, y] = actorBox.get_origin();
actorBox.set_origin(Math.floor(x + width / 2 - size / 2),
Math.floor(y + height / 2 - size / 2));
actorBox.set_origin(Math.ceil(x + width / 2 - size / 2),
Math.ceil(y + height / 2 - size / 2));
}
});