[PATCH weston v4 07/15] toytoolkit:Expose output make and model
Jason Ekstrand
jason at jlekstrand.net
Tue Feb 25 17:26:39 PST 2014
Signed-off-by: Jason Ekstrand <jason at jlekstrand.net>
---
clients/window.c | 22 ++++++++++++++++++++++
clients/window.h | 6 ++++++
2 files changed, 28 insertions(+)
diff --git a/clients/window.c b/clients/window.c
index b4b9588..6e132d5 100644
--- a/clients/window.c
+++ b/clients/window.c
@@ -349,6 +349,8 @@ struct output {
struct wl_list link;
int transform;
int scale;
+ char *make;
+ char *model;
display_output_handler_t destroy_handler;
void *user_data;
@@ -4738,6 +4740,14 @@ display_handle_geometry(void *data,
output->allocation.x = x;
output->allocation.y = y;
output->transform = transform;
+
+ if (output->make)
+ free(output->make);
+ output->make = strdup(make);
+
+ if (output->model)
+ free(output->model);
+ output->model = strdup(model);
}
static void
@@ -4925,6 +4935,18 @@ output_get_scale(struct output *output)
return output->scale;
}
+const char *
+output_get_make(struct output *output)
+{
+ return output->make;
+}
+
+const char *
+output_get_model(struct output *output)
+{
+ return output->model;
+}
+
static void
fini_xkb(struct input *input)
{
diff --git a/clients/window.h b/clients/window.h
index 7ec3537..d00c907 100644
--- a/clients/window.h
+++ b/clients/window.h
@@ -599,6 +599,12 @@ output_get_transform(struct output *output);
uint32_t
output_get_scale(struct output *output);
+const char *
+output_get_make(struct output *output);
+
+const char *
+output_get_model(struct output *output);
+
void
keysym_modifiers_add(struct wl_array *modifiers_map,
const char *name);
--
1.8.5.3
More information about the wayland-devel
mailing list