[mutter] native: only match drm subsystem devices

commit ef2000053ada1594ceb460956fd586fd0866cb41
Author: Ray Strode <rstrode redhat com>
Date:   Tue Oct 18 16:40:14 2016 -0400

    native: only match drm subsystem devices
    Despite g_udev_client_new taking a list of subsystems, it doesn't
    implicitly filter results to those subsystems.
    This commit explicitly adds a subsystem match to make sure sound cards
    don't end up in the resulting list of video cards.

 src/backends/native/meta-launcher.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/src/backends/native/meta-launcher.c b/src/backends/native/meta-launcher.c
index ea28e5a..03a928a 100644
--- a/src/backends/native/meta-launcher.c
+++ b/src/backends/native/meta-launcher.c
@@ -295,6 +295,11 @@ get_primary_gpu_path (const gchar *seat_name)
   g_udev_enumerator_add_match_name (enumerator, "card*");
   g_udev_enumerator_add_match_tag (enumerator, "seat");
+  /* We need to explicitly match the subsystem for now.
+   * https://bugzilla.gnome.org/show_bug.cgi?id=773224
+   */
+  g_udev_enumerator_add_match_subsystem (enumerator, "drm");
   devices = g_udev_enumerator_execute (enumerator);
   if (!devices)
     goto out;

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