diff options
author | emersion <contact@emersion.fr> | 2018-01-04 14:51:36 +0100 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-01-04 14:51:36 +0100 |
commit | d9ecfbaf325f66b15d60d0f8c4fe08a939cb6576 (patch) | |
tree | e9bef61d0ca1bec14d331461b188464fa8f3fbf9 | |
parent | 771263380c3b3b4b412964b0fe53619aa7c580e2 (diff) |
Add wlr_output enable event
-rw-r--r-- | include/wlr/types/wlr_output.h | 1 | ||||
-rw-r--r-- | types/wlr_output.c | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/include/wlr/types/wlr_output.h b/include/wlr/types/wlr_output.h index e7491704..a726c4c8 100644 --- a/include/wlr/types/wlr_output.h +++ b/include/wlr/types/wlr_output.h @@ -64,6 +64,7 @@ struct wlr_output { struct { struct wl_signal frame; struct wl_signal swap_buffers; + struct wl_signal enable; struct wl_signal resolution; struct wl_signal scale; struct wl_signal transform; diff --git a/types/wlr_output.c b/types/wlr_output.c index 18c2ef89..4b842571 100644 --- a/types/wlr_output.c +++ b/types/wlr_output.c @@ -146,6 +146,8 @@ void wlr_output_update_enabled(struct wlr_output *output, bool enabled) { } else { wlr_output_destroy_global(output); } + + wl_signal_emit(&output->events.enable, output); } static void wlr_output_update_matrix(struct wlr_output *output) { @@ -269,6 +271,7 @@ void wlr_output_init(struct wlr_output *output, struct wlr_backend *backend, wl_signal_init(&output->events.frame); wl_signal_init(&output->events.swap_buffers); wl_signal_init(&output->events.resolution); + wl_signal_init(&output->events.enable); wl_signal_init(&output->events.scale); wl_signal_init(&output->events.transform); wl_signal_init(&output->events.destroy); |