summaryrefslogtreecommitdiff
path: root/clients
diff options
context:
space:
mode:
authorJason Ekstrand <jason@jlekstrand.net>2014-04-02 19:53:50 -0500
committerKristian Høgsberg <krh@bitplanet.net>2014-04-02 21:26:16 -0700
commit738715d628f2b710c57544ed2db81be7e7450c52 (patch)
tree0ca7a0d9fddffd18ad2b638671bcf246f495cff3 /clients
parentce97a6b184034d5b284554083e1deabbf8b04b5f (diff)
toytoolkit: Expose output make and model
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Diffstat (limited to 'clients')
-rw-r--r--clients/window.c22
-rw-r--r--clients/window.h6
2 files changed, 28 insertions, 0 deletions
diff --git a/clients/window.c b/clients/window.c
index 6f89ae6a..5309f313 100644
--- a/clients/window.c
+++ b/clients/window.c
@@ -348,6 +348,8 @@ struct output {
struct wl_list link;
int transform;
int scale;
+ char *make;
+ char *model;
display_output_handler_t destroy_handler;
void *user_data;
@@ -4667,6 +4669,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
@@ -4854,6 +4864,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 38d574fb..0a113fcc 100644
--- a/clients/window.h
+++ b/clients/window.h
@@ -602,6 +602,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);