aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2022-12-01 10:13:12 +0100
committerSimon Zeni <simon@bl4ckb0ne.ca>2022-12-01 20:05:04 +0000
commitc8eb24d30e18c165728b8788a10716611c3b633d (patch)
treec686c78301f301891947510229b6bfa41c8099b6
parent4287f70dc325877829286eb8e0ecf1723465230a (diff)
output: drop enable/mode events
The backend no longer changes the output state behind the compositor's back. Instead, compositors can listen to the "commit" event and check for WLR_OUTPUT_STATE_ENABLED/WLR_OUTPUT_STATE_MODE. Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/2300
-rw-r--r--include/wlr/types/wlr_output.h2
-rw-r--r--types/output/output.c9
2 files changed, 0 insertions, 11 deletions
diff --git a/include/wlr/types/wlr_output.h b/include/wlr/types/wlr_output.h
index cf75d864..45a93d47 100644
--- a/include/wlr/types/wlr_output.h
+++ b/include/wlr/types/wlr_output.h
@@ -175,8 +175,6 @@ struct wlr_output {
struct wl_signal present; // wlr_output_event_present
// Emitted after a client bound the wl_output global
struct wl_signal bind; // wlr_output_event_bind
- struct wl_signal enable;
- struct wl_signal mode;
struct wl_signal description;
struct wl_signal request_state;
struct wl_signal destroy;
diff --git a/types/output/output.c b/types/output/output.c
index 5528ee04..dc2335cd 100644
--- a/types/output/output.c
+++ b/types/output/output.c
@@ -182,12 +182,7 @@ struct wlr_output *wlr_output_from_resource(struct wl_resource *resource) {
}
void wlr_output_update_enabled(struct wlr_output *output, bool enabled) {
- if (output->enabled == enabled) {
- return;
- }
-
output->enabled = enabled;
- wl_signal_emit_mutable(&output->events.enable, output);
}
static void output_update_matrix(struct wlr_output *output) {
@@ -264,8 +259,6 @@ void wlr_output_update_custom_mode(struct wlr_output *output, int32_t width,
send_current_mode(resource);
}
wlr_output_schedule_done(output);
-
- wl_signal_emit_mutable(&output->events.mode, output);
}
void wlr_output_set_transform(struct wlr_output *output,
@@ -371,8 +364,6 @@ void wlr_output_init(struct wlr_output *output, struct wlr_backend *backend,
wl_signal_init(&output->events.commit);
wl_signal_init(&output->events.present);
wl_signal_init(&output->events.bind);
- wl_signal_init(&output->events.enable);
- wl_signal_init(&output->events.mode);
wl_signal_init(&output->events.description);
wl_signal_init(&output->events.request_state);
wl_signal_init(&output->events.destroy);