[gnome-desktop/jjardon/gdkx_guards] gnome-idle-monitor.c: Do not use X-only code



commit eef831bf2e7eeb211ae81180079dc442f06ff116
Author: Javier Jardón <jjardon gnome org>
Date:   Sun Nov 24 19:47:16 2019 +0900

    gnome-idle-monitor.c: Do not use X-only code

 libgnome-desktop/gnome-idle-monitor.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/libgnome-desktop/gnome-idle-monitor.c b/libgnome-desktop/gnome-idle-monitor.c
index d7583a2b..9982e05a 100644
--- a/libgnome-desktop/gnome-idle-monitor.c
+++ b/libgnome-desktop/gnome-idle-monitor.c
@@ -25,7 +25,6 @@
 
 #include <glib.h>
 #include <glib/gi18n-lib.h>
-#include <gdk/gdkx.h>
 #include <gdk/gdk.h>
 #if defined(GDK_WINDOWING_WAYLAND)
 #include <gdk/gdkwayland.h>
@@ -208,8 +207,8 @@ gnome_idle_monitor_set_property (GObject      *object,
 
                g_free (monitor->priv->path);
                if (monitor->priv->device) {
-                       monitor->priv->path = g_strdup_printf ("/org/gnome/Mutter/IdleMonitor/Device%d",
-                                                              gdk_x11_device_get_id (monitor->priv->device));
+                       monitor->priv->path = g_strdup_printf ("/org/gnome/Mutter/IdleMonitor/Device%s",
+                                                              gdk_device_get_product_id 
(monitor->priv->device));
                } else {
                        monitor->priv->path = g_strdup ("/org/gnome/Mutter/IdleMonitor/Core");
                }


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