[PATCH] Print compositor output method (X11/DRM/Wayland)

Darxus darxus at chaosreigns.com
Sun Feb 13 10:29:51 PST 2011


---
 compositor/compositor.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/compositor/compositor.c b/compositor/compositor.c
index 535b3f1..5bd3454 100644
--- a/compositor/compositor.c
+++ b/compositor/compositor.c
@@ -1306,18 +1306,24 @@ int main(int argc, char *argv[])
 	ec = NULL;
 
 #if BUILD_WAYLAND_COMPOSITOR
-	if (getenv("WAYLAND_DISPLAY"))
+	if (getenv("WAYLAND_DISPLAY")) {
 		ec = wayland_compositor_create(display, width, height);
+		fprintf(stderr, "Wayland compositor output method is Wayland (nested).\n");
+	}
 #endif
 
 #if BUILD_X11_COMPOSITOR
-	if (ec == NULL && getenv("DISPLAY"))
+	if (ec == NULL && getenv("DISPLAY")) {
 		ec = x11_compositor_create(display, width, height);
+		fprintf(stderr, "Wayland compositor output method is X11.\n");
+	}
 #endif
 
 #if BUILD_DRM_COMPOSITOR
-	if (ec == NULL)
+	if (ec == NULL) {
 		ec = drm_compositor_create(display, option_connector);
+		fprintf(stderr, "Wayland compositor output method is DRM.\n");
+	}
 #endif
 
 	if (ec == NULL) {
-- 
1.7.1



More information about the wayland-devel mailing list