[mutter/wayland] monitor: Kill off another use of is_native



commit 4e6321c239208b39db43551fcf30d98feb348b85
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Feb 17 20:51:35 2014 -0500

    monitor: Kill off another use of is_native

 src/core/monitor.c |   26 ++++++++++++++++----------
 1 files changed, 16 insertions(+), 10 deletions(-)
---
diff --git a/src/core/monitor.c b/src/core/monitor.c
index 4f4d105..110bb40 100644
--- a/src/core/monitor.c
+++ b/src/core/monitor.c
@@ -356,19 +356,25 @@ make_logical_config (MetaMonitorManager *manager)
 static GType
 get_default_backend (void)
 {
-  if (meta_is_wayland_compositor ())
-    {
-      MetaWaylandCompositor *compositor;
-
-      compositor = meta_wayland_compositor_get_default ();
+#if defined(CLUTTER_WINDOWING_EGL)
+  if (clutter_check_windowing_backend (CLUTTER_WINDOWING_EGL))
+    return META_TYPE_MONITOR_MANAGER_KMS;
+#endif
 
-      if (meta_wayland_compositor_is_native (compositor))
-        return META_TYPE_MONITOR_MANAGER_KMS;
-      else
+#if defined(CLUTTER_WINDOWING_X11)
+  if (clutter_check_windowing_backend (CLUTTER_WINDOWING_X11))
+    {
+      /* If we're a Wayland compositor using the X11 backend,
+       * we're a nested configuration, so return the dummy
+       * monitor setup. */
+      if (meta_is_wayland_compositor ())
         return META_TYPE_MONITOR_MANAGER;
+      else
+        return META_TYPE_MONITOR_MANAGER_XRANDR;
     }
-  else
-    return META_TYPE_MONITOR_MANAGER_XRANDR;
+#endif
+
+  g_assert_not_reached ();
 }
 
 static MetaMonitorManager *


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