mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 04:45:58 +01:00
tinywl: Drop usage of wlr_output.pending
This commit is contained in:
parent
495bcbeedd
commit
73ca1ea48a
1 changed files with 8 additions and 5 deletions
|
@ -602,13 +602,16 @@ static void server_new_output(struct wl_listener *listener, void *data) {
|
||||||
* refresh rate), and each monitor supports only a specific set of modes. We
|
* refresh rate), and each monitor supports only a specific set of modes. We
|
||||||
* just pick the monitor's preferred mode, a more sophisticated compositor
|
* just pick the monitor's preferred mode, a more sophisticated compositor
|
||||||
* would let the user configure it. */
|
* would let the user configure it. */
|
||||||
if (!wl_list_empty(&wlr_output->modes)) {
|
|
||||||
struct wlr_output_mode *mode = wlr_output_preferred_mode(wlr_output);
|
struct wlr_output_mode *mode = wlr_output_preferred_mode(wlr_output);
|
||||||
wlr_output_set_mode(wlr_output, mode);
|
if (mode != NULL) {
|
||||||
wlr_output_enable(wlr_output, true);
|
struct wlr_output_state state = {0};
|
||||||
if (!wlr_output_commit(wlr_output)) {
|
wlr_output_state_set_mode(&state, mode);
|
||||||
|
wlr_output_state_set_enabled(&state, true);
|
||||||
|
if (!wlr_output_commit_state(wlr_output, &state)) {
|
||||||
|
wlr_output_state_finish(&state);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
wlr_output_state_finish(&state);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Allocates and configures our state for this output */
|
/* Allocates and configures our state for this output */
|
||||||
|
|
Loading…
Reference in a new issue