[gnome-shell] extension-tool: Fix multi-monitor handling in example extension



commit e865db57e0e213a808c22958736bc00056a72f5d
Author: Florian Müllner <fmuellner gnome org>
Date:   Sat Jul 5 11:20:01 2014 +0200

    extension-tool: Fix multi-monitor handling in example extension

 src/gnome-shell-extension-tool.in |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/gnome-shell-extension-tool.in b/src/gnome-shell-extension-tool.in
index 988271f..e00d5cd 100644
--- a/src/gnome-shell-extension-tool.in
+++ b/src/gnome-shell-extension-tool.in
@@ -42,8 +42,8 @@ function _showHello() {
 
     let monitor = Main.layoutManager.primaryMonitor;
 
-    text.set_position(Math.floor(monitor.width / 2 - text.width / 2),
-                      Math.floor(monitor.height / 2 - text.height / 2));
+    text.set_position(monitor.x + Math.floor(monitor.width / 2 - text.width / 2),
+                      monitor.y + Math.floor(monitor.height / 2 - text.height / 2));
 
     Tweener.addTween(text,
                      { opacity: 0,


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