aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2017-08-17 16:19:08 -0400
committerDrew DeVault <sir@cmpwn.com>2017-08-17 21:05:13 -0400
commite0b409760d22a2507c515ddfc1eb755b89b73757 (patch)
tree16389b8993a57bfc44eb428177ecbcf8df8beff9
parent128f06405bf20358ae4a685d3df9e471ad693cb3 (diff)
fix output resolution callback
-rw-r--r--examples/shared.c2
-rw-r--r--examples/shared.h3
2 files changed, 4 insertions, 1 deletions
diff --git a/examples/shared.c b/examples/shared.c
index 1474f8a2..5ebb7aa6 100644
--- a/examples/shared.c
+++ b/examples/shared.c
@@ -433,7 +433,7 @@ static void output_resolution_notify(struct wl_listener *listener, void *data) {
struct compositor_state *compositor = output->compositor;
if (compositor->output_resolution_cb) {
- compositor->output_resolution_cb(output);
+ compositor->output_resolution_cb(compositor, output);
}
}
diff --git a/examples/shared.h b/examples/shared.h
index 9ffd506a..e2ebadef 100644
--- a/examples/shared.h
+++ b/examples/shared.h
@@ -16,6 +16,7 @@ struct output_state {
struct compositor_state *compositor;
struct wlr_output *output;
struct wl_listener frame;
+ struct wl_listener resolution;
struct timespec last_frame;
struct wl_list link;
void *data;
@@ -78,6 +79,8 @@ struct compositor_state {
void (*keyboard_add_cb)(struct keyboard_state *s);
void (*output_frame_cb)(struct output_state *s, struct timespec *ts);
void (*output_remove_cb)(struct output_state *s);
+ void (*output_resolution_cb)(struct compositor_state *compositor,
+ struct output_state *s);
void (*keyboard_remove_cb)(struct keyboard_state *s);
void (*keyboard_key_cb)(struct keyboard_state *s, uint32_t keycode,
xkb_keysym_t sym, enum wlr_key_state key_state);