[gnome-shell] osdWindow: always round-up sizes when updating allocation



commit f819654ec8f95e4aa38810e8513f4ee004be7b02
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Mon Oct 10 16:59:31 2016 -0700

    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 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/osdWindow.js b/js/ui/osdWindow.js
index 432ea9a..4c2b00b 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));
     }
 });
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]