diff options
author | Scott Anderson <scott@anderso.nz> | 2020-02-08 19:09:41 +1300 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-02-08 11:38:44 +0100 |
commit | 2fea2fced8350ce52b3ea9c2d3f62797f7e61b56 (patch) | |
tree | 9a98e0c8c551fd07ed9ccc1335c6c9982a16ad24 /examples | |
parent | 4b051aa926aa37b99f586b47caab1dcdfddfee65 (diff) |
examples: Fix compositor-examples
Due to the way the wlr_output API was changed, these examples would
never get a frame event to start the rendering loop. We now commit the
outputs to start it.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/fullscreen-shell.c | 2 | ||||
-rw-r--r-- | examples/multi-pointer.c | 2 | ||||
-rw-r--r-- | examples/output-layout.c | 2 | ||||
-rw-r--r-- | examples/pointer.c | 2 | ||||
-rw-r--r-- | examples/rotation.c | 2 | ||||
-rw-r--r-- | examples/simple.c | 2 | ||||
-rw-r--r-- | examples/tablet.c | 2 | ||||
-rw-r--r-- | examples/touch.c | 2 |
8 files changed, 16 insertions, 0 deletions
diff --git a/examples/fullscreen-shell.c b/examples/fullscreen-shell.c index dbea9f04..cac8853b 100644 --- a/examples/fullscreen-shell.c +++ b/examples/fullscreen-shell.c @@ -163,6 +163,8 @@ static void server_handle_new_output(struct wl_listener *listener, void *data) { wlr_output_layout_add_auto(server->output_layout, wlr_output); wlr_output_create_global(wlr_output); + + wlr_output_commit(wlr_output); } static void server_handle_present_surface(struct wl_listener *listener, diff --git a/examples/multi-pointer.c b/examples/multi-pointer.c index 28f6eca8..9f7bd6c8 100644 --- a/examples/multi-pointer.c +++ b/examples/multi-pointer.c @@ -171,6 +171,8 @@ static void new_output_notify(struct wl_listener *listener, void *data) { cursor->cursor->y); } wl_list_insert(&sample->outputs, &sample_output->link); + + wlr_output_commit(output); } static void keyboard_key_notify(struct wl_listener *listener, void *data) { diff --git a/examples/output-layout.c b/examples/output-layout.c index 2a1cc320..c9ca53a4 100644 --- a/examples/output-layout.c +++ b/examples/output-layout.c @@ -169,6 +169,8 @@ static void new_output_notify(struct wl_listener *listener, void *data) { sample_output->frame.notify = output_frame_notify; wl_signal_add(&output->events.destroy, &sample_output->destroy); sample_output->destroy.notify = output_remove_notify; + + wlr_output_commit(output); } static void keyboard_key_notify(struct wl_listener *listener, void *data) { diff --git a/examples/pointer.c b/examples/pointer.c index 5e137a1a..520742d7 100644 --- a/examples/pointer.c +++ b/examples/pointer.c @@ -265,6 +265,8 @@ static void new_output_notify(struct wl_listener *listener, void *data) { wlr_xcursor_manager_load(sample->xcursor_manager, output->scale); wlr_xcursor_manager_set_cursor_image(sample->xcursor_manager, "left_ptr", sample->cursor); + + wlr_output_commit(output); } diff --git a/examples/rotation.c b/examples/rotation.c index 3700351a..e76cc2a4 100644 --- a/examples/rotation.c +++ b/examples/rotation.c @@ -123,6 +123,8 @@ static void new_output_notify(struct wl_listener *listener, void *data) { wl_signal_add(&output->events.destroy, &sample_output->destroy); sample_output->destroy.notify = output_remove_notify; wl_list_insert(&sample->outputs, &sample_output->link); + + wlr_output_commit(output); } static void keyboard_key_notify(struct wl_listener *listener, void *data) { diff --git a/examples/simple.c b/examples/simple.c index bf2411c8..8540892d 100644 --- a/examples/simple.c +++ b/examples/simple.c @@ -91,6 +91,8 @@ static void new_output_notify(struct wl_listener *listener, void *data) { sample_output->frame.notify = output_frame_notify; wl_signal_add(&output->events.destroy, &sample_output->destroy); sample_output->destroy.notify = output_remove_notify; + + wlr_output_commit(sample_output->output); } static void keyboard_key_notify(struct wl_listener *listener, void *data) { diff --git a/examples/tablet.c b/examples/tablet.c index d33fb224..7721ef72 100644 --- a/examples/tablet.c +++ b/examples/tablet.c @@ -248,6 +248,8 @@ static void new_output_notify(struct wl_listener *listener, void *data) { sample_output->frame.notify = output_frame_notify; wl_signal_add(&output->events.destroy, &sample_output->destroy); sample_output->destroy.notify = output_remove_notify; + + wlr_output_commit(output); } static void keyboard_key_notify(struct wl_listener *listener, void *data) { diff --git a/examples/touch.c b/examples/touch.c index 07d44563..39dd1d45 100644 --- a/examples/touch.c +++ b/examples/touch.c @@ -161,6 +161,8 @@ static void new_output_notify(struct wl_listener *listener, void *data) { sample_output->frame.notify = output_frame_notify; wl_signal_add(&output->events.destroy, &sample_output->destroy); sample_output->destroy.notify = output_remove_notify; + + wlr_output_commit(output); } static void keyboard_key_notify(struct wl_listener *listener, void *data) { |