[at-spi2-core/wip/carlosg/x11-session-checks: 3/3] Only use x11 device event controller implementation on X11 sessions



commit c52d4c203866551ef1e1a2909c1d5cf47ddfbcd1
Author: Carlos Garnacho <carlosg gnome org>
Date:   Mon May 6 16:18:04 2019 +0200

    Only use x11 device event controller implementation on X11 sessions
    
    A wayland compositor would be impervious to the actions performed
    there, so it only could only partially work with other X11 clients.
    That doesn't seem like the intended effect.

 registryd/deviceeventcontroller.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/registryd/deviceeventcontroller.c b/registryd/deviceeventcontroller.c
index 4e25ad6..0519b49 100644
--- a/registryd/deviceeventcontroller.c
+++ b/registryd/deviceeventcontroller.c
@@ -1856,7 +1856,7 @@ spi_device_event_controller_class_init (SpiDEControllerClass *klass)
   object_class->finalize = spi_device_event_controller_object_finalize;
 
 #ifdef HAVE_X11
-  if (g_getenv ("DISPLAY"))
+  if (g_strcmp0 (g_getenv ("XDG_SESSION_TYPE"), "x11") == 0)
     spi_dec_setup_x11 (klass);
   else
 #endif


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