From f819654ec8f95e4aa38810e8513f4ee004be7b02 Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Mon, 10 Oct 2016 16:59:31 -0700 Subject: [PATCH] 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 --- js/ui/osdWindow.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/ui/osdWindow.js b/js/ui/osdWindow.js index 432ea9af7..4c2b00b22 100644 --- a/js/ui/osdWindow.js +++ b/js/ui/osdWindow.js @@ -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)); } });