[PATCH weston] compositor-x11: Simplify width and height assignment.

Scott Moreau oreaus at gmail.com
Sun Nov 4 16:47:58 PST 2012


This code was confusing and the fallback paths are never used here. The
fallback is already set accordingly when configured_output_list is built.
---

This patch probably depends on "compisitor-x11: Handle --fullscreen better."

 src/compositor-x11.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/compositor-x11.c b/src/compositor-x11.c
index 75de857..e410ab2 100644
--- a/src/compositor-x11.c
+++ b/src/compositor-x11.c
@@ -1201,8 +1201,8 @@ x11_compositor_create(struct wl_display *display,
 	if (x11_input_create(c, no_input) < 0)
 		goto err_egl;
 
-	width = option_width ? option_width : 1024;
-	height = option_height ? option_height : 640;
+	width = option_width;
+	height = option_height;
 	count = option_count ? option_count : 1;
 
 	wl_list_for_each(o, &configured_output_list, link) {
@@ -1211,9 +1211,9 @@ x11_compositor_create(struct wl_display *display,
 			o->height = c->screen->height_in_pixels;
 		}
 		output = x11_compositor_create_output(c, x, 0,
-						      option_width ? width :
+						      width ? width :
 						      o->width,
-						      option_height ? height :
+						      height ? height :
 						      o->height,
 						      fullscreen, no_input,
 						      o->name, o->transform);
-- 
1.7.11.7



More information about the wayland-devel mailing list