mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-26 06:35:58 +01:00
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
This commit is contained in:
parent
4287f70dc3
commit
c8eb24d30e
2 changed files with 0 additions and 11 deletions
|
@ -175,8 +175,6 @@ struct wlr_output {
|
||||||
struct wl_signal present; // wlr_output_event_present
|
struct wl_signal present; // wlr_output_event_present
|
||||||
// Emitted after a client bound the wl_output global
|
// Emitted after a client bound the wl_output global
|
||||||
struct wl_signal bind; // wlr_output_event_bind
|
struct wl_signal bind; // wlr_output_event_bind
|
||||||
struct wl_signal enable;
|
|
||||||
struct wl_signal mode;
|
|
||||||
struct wl_signal description;
|
struct wl_signal description;
|
||||||
struct wl_signal request_state;
|
struct wl_signal request_state;
|
||||||
struct wl_signal destroy;
|
struct wl_signal destroy;
|
||||||
|
|
|
@ -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) {
|
void wlr_output_update_enabled(struct wlr_output *output, bool enabled) {
|
||||||
if (output->enabled == enabled) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
output->enabled = enabled;
|
output->enabled = enabled;
|
||||||
wl_signal_emit_mutable(&output->events.enable, output);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void output_update_matrix(struct wlr_output *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);
|
send_current_mode(resource);
|
||||||
}
|
}
|
||||||
wlr_output_schedule_done(output);
|
wlr_output_schedule_done(output);
|
||||||
|
|
||||||
wl_signal_emit_mutable(&output->events.mode, output);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wlr_output_set_transform(struct wlr_output *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.commit);
|
||||||
wl_signal_init(&output->events.present);
|
wl_signal_init(&output->events.present);
|
||||||
wl_signal_init(&output->events.bind);
|
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.description);
|
||||||
wl_signal_init(&output->events.request_state);
|
wl_signal_init(&output->events.request_state);
|
||||||
wl_signal_init(&output->events.destroy);
|
wl_signal_init(&output->events.destroy);
|
||||||
|
|
Loading…
Reference in a new issue