[gnome-shell/benzea/osd-on-connector] shellDBus: Accept connector string rather than monitor ID

commit 2bf7f4d2175c6bfcdcf1092eb7261e9eff9ec9c2
Author: Benjamin Berg <bberg redhat com>
Date:   Thu Apr 11 11:43:03 2019 +0200

    shellDBus: Accept connector string rather than monitor ID
    The monitor index is not something that gnome-shell and
    gnome-settings-daemon seem to be agreeing about. Using the connector
    string is a much more reliable method of identifying a specific screen
    and we are indeed using this already for monitor labling.
    So switch over to use the connector rather than the monitor index. If a
    user tries to use the old API, then the OSD will simply show up on all
    monitors (which is the status quo currently anyway).

 js/ui/shellDBus.js | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/js/ui/shellDBus.js b/js/ui/shellDBus.js
index 469a6c706..28b78a0e4 100644
--- a/js/ui/shellDBus.js
+++ b/js/ui/shellDBus.js
@@ -79,14 +79,15 @@ var GnomeShell = class {
         for (let param in params)
             params[param] = params[param].deep_unpack();
-        let { monitor: monitorIndex,
+        let { connector: connector,
               max_level: maxLevel,
               icon: serializedIcon } = params;
-        if (monitorIndex === undefined)
-            monitorIndex = -1;
+        let monitorIndex = -1;
+        if (connector)
+            monitorIndex = this._monitorManager.get_monitor_for_output(connector);
         let icon = null;
         if (serializedIcon)

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