diff options
author | Kristian Høgsberg <krh@bitplanet.net> | 2011-07-20 13:35:27 -0700 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2012-03-27 09:31:59 -0400 |
commit | c3de5dabd084cbace0a149539a355405181f960a (patch) | |
tree | bb64175377d6c4cff1d1b755b3f1251acb6c64d2 | |
parent | 28d9b745e052e23149906fcd34c71c62785e0655 (diff) |
xwayland: Get output details from wayland
-rw-r--r-- | hw/xfree86/xwayland/xwayland-output.c | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/hw/xfree86/xwayland/xwayland-output.c b/hw/xfree86/xwayland/xwayland-output.c index ed2039103..36b97078d 100644 --- a/hw/xfree86/xwayland/xwayland-output.c +++ b/hw/xfree86/xwayland/xwayland-output.c @@ -182,15 +182,10 @@ xwl_output_create(struct xwl_screen *xwl_screen) } xwl_output->xwl_screen = xwl_screen; - xwl_output->width = xwl_screen->width = 800; - xwl_output->height = xwl_screen->height = 600; xf86output = xf86OutputCreate(xwl_screen->scrninfo, &output_funcs, "XWAYLAND-1"); xf86output->driver_private = xwl_output; - xf86output->mm_width = 300; - xf86output->mm_height = 240; - xf86output->subpixel_order = SubPixelHorizontalRGB; xf86output->possible_crtcs = 1; xf86output->possible_clones = 1; @@ -230,6 +225,30 @@ display_handle_geometry(void *data, { struct xwl_output *xwl_output = data; + xwl_output->xf86output->mm_width = physical_width; + xwl_output->xf86output->mm_height = physical_height; + + switch (subpixel) { + case WL_OUTPUT_SUBPIXEL_UNKNOWN: + xwl_output->xf86output->subpixel_order = SubPixelUnknown; + break; + case WL_OUTPUT_SUBPIXEL_NONE: + xwl_output->xf86output->subpixel_order = SubPixelNone; + break; + case WL_OUTPUT_SUBPIXEL_HORIZONTAL_RGB: + xwl_output->xf86output->subpixel_order = SubPixelHorizontalRGB; + break; + case WL_OUTPUT_SUBPIXEL_HORIZONTAL_BGR: + xwl_output->xf86output->subpixel_order = SubPixelHorizontalBGR; + break; + case WL_OUTPUT_SUBPIXEL_VERTICAL_RGB: + xwl_output->xf86output->subpixel_order = SubPixelVerticalRGB; + break; + case WL_OUTPUT_SUBPIXEL_VERTICAL_BGR: + xwl_output->xf86output->subpixel_order = SubPixelVerticalBGR; + break; + } + xwl_output->x = x; xwl_output->y = y; } |