Remove unnecessary wl_display_dispatch calls

wl_display_roundtrip already takes care of dispatching the display.
This commit is contained in:
Simon Ser 2020-08-24 10:27:03 +02:00 committed by Drew DeVault
parent bad1e9afa8
commit 297354f847
18 changed files with 0 additions and 19 deletions

View File

@ -279,7 +279,6 @@ struct wlr_backend *wlr_wl_backend_create(struct wl_display *display,
} }
wl_registry_add_listener(wl->registry, &registry_listener, wl); wl_registry_add_listener(wl->registry, &registry_listener, wl);
wl_display_dispatch(wl->remote_display);
wl_display_roundtrip(wl->remote_display); wl_display_roundtrip(wl->remote_display);
if (!wl->compositor) { if (!wl->compositor) {

View File

@ -754,7 +754,6 @@ static int init(struct capture_context *ctx) {
wl_registry_add_listener(ctx->registry, &registry_listener, ctx); wl_registry_add_listener(ctx->registry, &registry_listener, ctx);
wl_display_roundtrip(ctx->display); wl_display_roundtrip(ctx->display);
wl_display_dispatch(ctx->display);
if (!ctx->export_manager) { if (!ctx->export_manager) {
av_log(ctx, AV_LOG_ERROR, "Compositor doesn't support %s!\n", av_log(ctx, AV_LOG_ERROR, "Compositor doesn't support %s!\n",

View File

@ -332,7 +332,6 @@ int main(int argc, char **argv) {
struct wl_registry *registry = wl_display_get_registry(display); struct wl_registry *registry = wl_display_get_registry(display);
wl_registry_add_listener(registry, &registry_listener, NULL); wl_registry_add_listener(registry, &registry_listener, NULL);
wl_display_dispatch(display);
wl_display_roundtrip(display); wl_display_roundtrip(display);
if (toplevel_manager == NULL) { if (toplevel_manager == NULL) {

View File

@ -162,7 +162,6 @@ int main(int argc, char *argv[]) {
struct wl_registry *registry = wl_display_get_registry(display); struct wl_registry *registry = wl_display_get_registry(display);
wl_registry_add_listener(registry, &registry_listener, NULL); wl_registry_add_listener(registry, &registry_listener, NULL);
wl_display_dispatch(display);
wl_display_roundtrip(display); wl_display_roundtrip(display);
if (gamma_control_manager == NULL) { if (gamma_control_manager == NULL) {

View File

@ -177,7 +177,6 @@ int main(int argc, char **argv) {
struct wl_registry *registry = wl_display_get_registry(display); struct wl_registry *registry = wl_display_get_registry(display);
wl_registry_add_listener(registry, &registry_listener, NULL); wl_registry_add_listener(registry, &registry_listener, NULL);
wl_display_dispatch(display);
wl_display_roundtrip(display); wl_display_roundtrip(display);
if (compositor == NULL) { if (compositor == NULL) {

View File

@ -125,7 +125,6 @@ int main(int argc, char *argv[]) {
struct wl_registry *registry = wl_display_get_registry(display); struct wl_registry *registry = wl_display_get_registry(display);
wl_registry_add_listener(registry, &registry_listener, NULL); wl_registry_add_listener(registry, &registry_listener, NULL);
wl_display_dispatch(display);
wl_display_roundtrip(display); wl_display_roundtrip(display);
wl_registry_destroy(registry); wl_registry_destroy(registry);

View File

@ -150,7 +150,6 @@ int main(int argc, char **argv) {
struct wl_registry *registry = wl_display_get_registry(display); struct wl_registry *registry = wl_display_get_registry(display);
assert(registry); assert(registry);
wl_registry_add_listener(registry, &registry_listener, NULL); wl_registry_add_listener(registry, &registry_listener, NULL);
wl_display_dispatch(display);
wl_display_roundtrip(display); wl_display_roundtrip(display);
assert(compositor && seat && wm_base && input_inhibit_manager); assert(compositor && seat && wm_base && input_inhibit_manager);

View File

@ -191,7 +191,6 @@ int main(int argc, char **argv) {
struct wl_registry *registry = wl_display_get_registry(display); struct wl_registry *registry = wl_display_get_registry(display);
wl_registry_add_listener(registry, &registry_listener, NULL); wl_registry_add_listener(registry, &registry_listener, NULL);
wl_display_dispatch(display);
wl_display_roundtrip(display); wl_display_roundtrip(display);
if (input_method_manager == NULL) { if (input_method_manager == NULL) {

View File

@ -324,7 +324,6 @@ int main(int argc, char **argv) {
struct wl_registry *registry = wl_display_get_registry(display); struct wl_registry *registry = wl_display_get_registry(display);
wl_registry_add_listener(registry, &registry_listener, NULL); wl_registry_add_listener(registry, &registry_listener, NULL);
wl_display_dispatch(display);
wl_display_roundtrip(display); wl_display_roundtrip(display);
if (compositor == NULL) { if (compositor == NULL) {

View File

@ -209,7 +209,6 @@ int main(int argc, char **argv) {
struct wl_registry *registry = wl_display_get_registry(display); struct wl_registry *registry = wl_display_get_registry(display);
wl_registry_add_listener(registry, &registry_listener, NULL); wl_registry_add_listener(registry, &registry_listener, NULL);
wl_display_dispatch(display);
wl_display_roundtrip(display); wl_display_roundtrip(display);
if (compositor == NULL) { if (compositor == NULL) {

View File

@ -109,7 +109,6 @@ int main(int argc, char *argv[]) {
struct wl_registry *registry = wl_display_get_registry(display); struct wl_registry *registry = wl_display_get_registry(display);
wl_registry_add_listener(registry, &registry_listener, NULL); wl_registry_add_listener(registry, &registry_listener, NULL);
wl_display_dispatch(display);
wl_display_roundtrip(display); wl_display_roundtrip(display);
if (output_power_manager == NULL) { if (output_power_manager == NULL) {

View File

@ -198,7 +198,6 @@ int main(int argc, char **argv) {
struct wl_registry *registry = wl_display_get_registry(display); struct wl_registry *registry = wl_display_get_registry(display);
wl_registry_add_listener(registry, &registry_listener, NULL); wl_registry_add_listener(registry, &registry_listener, NULL);
wl_display_dispatch(display);
wl_display_roundtrip(display); wl_display_roundtrip(display);
struct wl_region *disjoint_region = wl_compositor_create_region(compositor); struct wl_region *disjoint_region = wl_compositor_create_region(compositor);

View File

@ -412,7 +412,6 @@ int main(int argc, char **argv) {
struct wl_registry *registry = wl_display_get_registry(display); struct wl_registry *registry = wl_display_get_registry(display);
wl_registry_add_listener(registry, &registry_listener, NULL); wl_registry_add_listener(registry, &registry_listener, NULL);
wl_display_dispatch(display);
wl_display_roundtrip(display); wl_display_roundtrip(display);
/* Check that all the global interfaces were captured */ /* Check that all the global interfaces were captured */

View File

@ -315,7 +315,6 @@ int main(int argc, char *argv[]) {
struct wl_registry *registry = wl_display_get_registry(display); struct wl_registry *registry = wl_display_get_registry(display);
wl_registry_add_listener(registry, &registry_listener, NULL); wl_registry_add_listener(registry, &registry_listener, NULL);
wl_display_dispatch(display);
wl_display_roundtrip(display); wl_display_roundtrip(display);
if (dmabuf == NULL) { if (dmabuf == NULL) {

View File

@ -234,7 +234,6 @@ int main(int argc, char *argv[]) {
struct wl_registry *registry = wl_display_get_registry(display); struct wl_registry *registry = wl_display_get_registry(display);
wl_registry_add_listener(registry, &registry_listener, NULL); wl_registry_add_listener(registry, &registry_listener, NULL);
wl_display_dispatch(display);
wl_display_roundtrip(display); wl_display_roundtrip(display);
if (shm == NULL) { if (shm == NULL) {

View File

@ -344,7 +344,6 @@ int main(int argc, char **argv) {
struct wl_registry *registry = wl_display_get_registry(display); struct wl_registry *registry = wl_display_get_registry(display);
wl_registry_add_listener(registry, &registry_listener, NULL); wl_registry_add_listener(registry, &registry_listener, NULL);
wl_display_dispatch(display);
wl_display_roundtrip(display); wl_display_roundtrip(display);
if (compositor == NULL) { if (compositor == NULL) {

View File

@ -203,7 +203,6 @@ int main(int argc, char **argv) {
struct wl_registry *registry = wl_display_get_registry(display); struct wl_registry *registry = wl_display_get_registry(display);
wl_registry_add_listener(registry, &registry_listener, NULL); wl_registry_add_listener(registry, &registry_listener, NULL);
wl_display_dispatch(display);
wl_display_roundtrip(display); wl_display_roundtrip(display);
if (compositor == NULL) { if (compositor == NULL) {

View File

@ -67,7 +67,6 @@ int main(int argc, char *argv[]) {
struct wl_registry *registry = wl_display_get_registry(display); struct wl_registry *registry = wl_display_get_registry(display);
wl_registry_add_listener(registry, &registry_listener, NULL); wl_registry_add_listener(registry, &registry_listener, NULL);
wl_display_dispatch(display);
wl_display_roundtrip(display); wl_display_roundtrip(display);
if (pointer_manager == NULL) { if (pointer_manager == NULL) {
@ -132,7 +131,6 @@ int main(int argc, char *argv[]) {
zwlr_virtual_pointer_v1_frame(pointer); zwlr_virtual_pointer_v1_frame(pointer);
zwlr_virtual_pointer_v1_destroy(pointer); zwlr_virtual_pointer_v1_destroy(pointer);
wl_display_dispatch(display);
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }