compositor: Don't hardcode output transform when sending the event
authorKristian Høgsberg <krh@bitplanet.net>
Fri, 10 Aug 2012 14:09:20 +0000 (10:09 -0400)
committerKristian Høgsberg <krh@bitplanet.net>
Fri, 10 Aug 2012 14:09:20 +0000 (10:09 -0400)
We add a transform field to weston_output and backends can override it
when they create the output.

src/compositor.c
src/compositor.h

index 54b1f56..293e679 100644 (file)
@@ -2789,7 +2789,7 @@ bind_output(struct wl_client *client,
                                output->mm_height,
                                output->subpixel,
                                output->make, output->model,
-                               WL_OUTPUT_TRANSFORM_NORMAL);
+                               output->transform);
 
        wl_list_for_each (mode, &output->mode_list, link) {
                wl_output_send_mode(resource,
@@ -3029,6 +3029,7 @@ weston_output_init(struct weston_output *output, struct weston_compositor *c,
        output->mm_width = width;
        output->mm_height = height;
        output->dirty = 1;
+       output->transform = WL_OUTPUT_TRANSFORM_NORMAL;
 
        weston_output_init_zoom(output);
 
index b3c554b..ccac91e 100644 (file)
@@ -168,6 +168,7 @@ struct weston_output {
 
        char *make, *model;
        uint32_t subpixel;
+       uint32_t transform;
        
        struct weston_mode *current;
        struct weston_mode *origin;