mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2024-11-24 08:02:21 +00:00
examples: Drop usage of wlr_output.pending
This commit is contained in:
parent
0925a500d1
commit
495bcbeedd
@ -166,10 +166,11 @@ static void server_handle_new_output(struct wl_listener *listener, void *data) {
|
||||
|
||||
struct wlr_output_mode *mode = wlr_output_preferred_mode(wlr_output);
|
||||
if (mode != NULL) {
|
||||
wlr_output_set_mode(wlr_output, mode);
|
||||
struct wlr_output_state state = {0};
|
||||
wlr_output_state_set_mode(&state, mode);
|
||||
wlr_output_commit_state(wlr_output, &state);
|
||||
wlr_output_state_finish(&state);
|
||||
}
|
||||
|
||||
wlr_output_commit(wlr_output);
|
||||
}
|
||||
|
||||
static void server_handle_present_surface(struct wl_listener *listener,
|
||||
|
@ -175,10 +175,12 @@ static void server_handle_new_output(struct wl_listener *listener, void *data) {
|
||||
wl_signal_add(&wlr_output->events.frame, &output->frame);
|
||||
wl_list_insert(&server->outputs, &output->link);
|
||||
|
||||
if (!wl_list_empty(&wlr_output->modes)) {
|
||||
struct wlr_output_mode *mode = wlr_output_preferred_mode(wlr_output);
|
||||
wlr_output_set_mode(wlr_output, mode);
|
||||
wlr_output_commit(wlr_output);
|
||||
struct wlr_output_mode *mode = wlr_output_preferred_mode(wlr_output);
|
||||
if (mode != NULL) {
|
||||
struct wlr_output_state state = {0};
|
||||
wlr_output_state_set_mode(&state, mode);
|
||||
wlr_output_commit_state(wlr_output, &state);
|
||||
wlr_output_state_finish(&state);
|
||||
}
|
||||
|
||||
wlr_output_create_global(wlr_output);
|
||||
|
@ -178,10 +178,11 @@ static void new_output_notify(struct wl_listener *listener, void *data) {
|
||||
|
||||
struct wlr_output_mode *mode = wlr_output_preferred_mode(output);
|
||||
if (mode != NULL) {
|
||||
wlr_output_set_mode(output, mode);
|
||||
struct wlr_output_state state = {0};
|
||||
wlr_output_state_set_mode(&state, mode);
|
||||
wlr_output_commit_state(output, &state);
|
||||
wlr_output_state_finish(&state);
|
||||
}
|
||||
|
||||
wlr_output_commit(output);
|
||||
}
|
||||
|
||||
static void keyboard_key_notify(struct wl_listener *listener, void *data) {
|
||||
|
@ -280,10 +280,11 @@ static void new_output_notify(struct wl_listener *listener, void *data) {
|
||||
|
||||
struct wlr_output_mode *mode = wlr_output_preferred_mode(output);
|
||||
if (mode != NULL) {
|
||||
wlr_output_set_mode(output, mode);
|
||||
struct wlr_output_state state = {0};
|
||||
wlr_output_state_set_mode(&state, mode);
|
||||
wlr_output_commit_state(output, &state);
|
||||
wlr_output_state_finish(&state);
|
||||
}
|
||||
|
||||
wlr_output_commit(output);
|
||||
}
|
||||
|
||||
|
||||
|
@ -122,7 +122,9 @@ static void new_output_notify(struct wl_listener *listener, void *data) {
|
||||
sample_output->x_offs = sample_output->y_offs = 0;
|
||||
sample_output->x_vel = sample_output->y_vel = 128;
|
||||
|
||||
wlr_output_set_transform(output, sample->transform);
|
||||
struct wlr_output_state state = {0};
|
||||
wlr_output_state_set_transform(&state, sample->transform);
|
||||
|
||||
sample_output->output = output;
|
||||
sample_output->sample = sample;
|
||||
wl_signal_add(&output->events.frame, &sample_output->frame);
|
||||
@ -133,10 +135,11 @@ static void new_output_notify(struct wl_listener *listener, void *data) {
|
||||
|
||||
struct wlr_output_mode *mode = wlr_output_preferred_mode(output);
|
||||
if (mode != NULL) {
|
||||
wlr_output_set_mode(output, mode);
|
||||
wlr_output_state_set_mode(&state, mode);
|
||||
}
|
||||
|
||||
wlr_output_commit(output);
|
||||
wlr_output_commit_state(output, &state);
|
||||
wlr_output_state_finish(&state);
|
||||
}
|
||||
|
||||
static void keyboard_key_notify(struct wl_listener *listener, void *data) {
|
||||
|
@ -81,10 +81,12 @@ static void server_handle_new_output(struct wl_listener *listener, void *data) {
|
||||
|
||||
output->scene_output = wlr_scene_output_create(server->scene, wlr_output);
|
||||
|
||||
if (!wl_list_empty(&wlr_output->modes)) {
|
||||
struct wlr_output_mode *mode = wlr_output_preferred_mode(wlr_output);
|
||||
wlr_output_set_mode(wlr_output, mode);
|
||||
wlr_output_commit(wlr_output);
|
||||
struct wlr_output_mode *mode = wlr_output_preferred_mode(wlr_output);
|
||||
if (mode != NULL) {
|
||||
struct wlr_output_state state = {0};
|
||||
wlr_output_state_set_mode(&state, mode);
|
||||
wlr_output_commit_state(wlr_output, &state);
|
||||
wlr_output_state_finish(&state);
|
||||
}
|
||||
|
||||
wlr_output_create_global(wlr_output);
|
||||
|
@ -107,10 +107,11 @@ static void new_output_notify(struct wl_listener *listener, void *data) {
|
||||
|
||||
struct wlr_output_mode *mode = wlr_output_preferred_mode(output);
|
||||
if (mode != NULL) {
|
||||
wlr_output_set_mode(output, mode);
|
||||
struct wlr_output_state state = {0};
|
||||
wlr_output_state_set_mode(&state, mode);
|
||||
wlr_output_commit_state(sample_output->output, &state);
|
||||
wlr_output_state_finish(&state);
|
||||
}
|
||||
|
||||
wlr_output_commit(sample_output->output);
|
||||
}
|
||||
|
||||
static void keyboard_key_notify(struct wl_listener *listener, void *data) {
|
||||
|
@ -285,10 +285,11 @@ static void new_output_notify(struct wl_listener *listener, void *data) {
|
||||
|
||||
struct wlr_output_mode *mode = wlr_output_preferred_mode(output);
|
||||
if (mode != NULL) {
|
||||
wlr_output_set_mode(output, mode);
|
||||
struct wlr_output_state state = {0};
|
||||
wlr_output_state_set_mode(&state, mode);
|
||||
wlr_output_commit_state(output, &state);
|
||||
wlr_output_state_finish(&state);
|
||||
}
|
||||
|
||||
wlr_output_commit(output);
|
||||
}
|
||||
|
||||
static void keyboard_key_notify(struct wl_listener *listener, void *data) {
|
||||
|
@ -184,10 +184,11 @@ static void new_output_notify(struct wl_listener *listener, void *data) {
|
||||
|
||||
struct wlr_output_mode *mode = wlr_output_preferred_mode(output);
|
||||
if (mode != NULL) {
|
||||
wlr_output_set_mode(output, mode);
|
||||
struct wlr_output_state state = {0};
|
||||
wlr_output_state_set_mode(&state, mode);
|
||||
wlr_output_commit_state(output, &state);
|
||||
wlr_output_state_finish(&state);
|
||||
}
|
||||
|
||||
wlr_output_commit(output);
|
||||
}
|
||||
|
||||
static void keyboard_key_notify(struct wl_listener *listener, void *data) {
|
||||
|
Loading…
Reference in New Issue
Block a user