mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2024-11-22 07:02:28 +00:00
Remove unnecessary wl_display_dispatch calls
wl_display_roundtrip already takes care of dispatching the display.
This commit is contained in:
parent
bad1e9afa8
commit
297354f847
@ -279,7 +279,6 @@ struct wlr_backend *wlr_wl_backend_create(struct wl_display *display,
|
|||||||
}
|
}
|
||||||
|
|
||||||
wl_registry_add_listener(wl->registry, ®istry_listener, wl);
|
wl_registry_add_listener(wl->registry, ®istry_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) {
|
||||||
|
@ -754,7 +754,6 @@ static int init(struct capture_context *ctx) {
|
|||||||
wl_registry_add_listener(ctx->registry, ®istry_listener, ctx);
|
wl_registry_add_listener(ctx->registry, ®istry_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",
|
||||||
|
@ -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, ®istry_listener, NULL);
|
wl_registry_add_listener(registry, ®istry_listener, NULL);
|
||||||
wl_display_dispatch(display);
|
|
||||||
wl_display_roundtrip(display);
|
wl_display_roundtrip(display);
|
||||||
|
|
||||||
if (toplevel_manager == NULL) {
|
if (toplevel_manager == NULL) {
|
||||||
|
@ -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, ®istry_listener, NULL);
|
wl_registry_add_listener(registry, ®istry_listener, NULL);
|
||||||
wl_display_dispatch(display);
|
|
||||||
wl_display_roundtrip(display);
|
wl_display_roundtrip(display);
|
||||||
|
|
||||||
if (gamma_control_manager == NULL) {
|
if (gamma_control_manager == NULL) {
|
||||||
|
@ -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, ®istry_listener, NULL);
|
wl_registry_add_listener(registry, ®istry_listener, NULL);
|
||||||
wl_display_dispatch(display);
|
|
||||||
wl_display_roundtrip(display);
|
wl_display_roundtrip(display);
|
||||||
|
|
||||||
if (compositor == NULL) {
|
if (compositor == NULL) {
|
||||||
|
@ -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, ®istry_listener, NULL);
|
wl_registry_add_listener(registry, ®istry_listener, NULL);
|
||||||
wl_display_dispatch(display);
|
|
||||||
wl_display_roundtrip(display);
|
wl_display_roundtrip(display);
|
||||||
wl_registry_destroy(registry);
|
wl_registry_destroy(registry);
|
||||||
|
|
||||||
|
@ -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, ®istry_listener, NULL);
|
wl_registry_add_listener(registry, ®istry_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);
|
||||||
|
|
||||||
|
@ -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, ®istry_listener, NULL);
|
wl_registry_add_listener(registry, ®istry_listener, NULL);
|
||||||
wl_display_dispatch(display);
|
|
||||||
wl_display_roundtrip(display);
|
wl_display_roundtrip(display);
|
||||||
|
|
||||||
if (input_method_manager == NULL) {
|
if (input_method_manager == NULL) {
|
||||||
|
@ -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, ®istry_listener, NULL);
|
wl_registry_add_listener(registry, ®istry_listener, NULL);
|
||||||
wl_display_dispatch(display);
|
|
||||||
wl_display_roundtrip(display);
|
wl_display_roundtrip(display);
|
||||||
|
|
||||||
if (compositor == NULL) {
|
if (compositor == NULL) {
|
||||||
|
@ -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, ®istry_listener, NULL);
|
wl_registry_add_listener(registry, ®istry_listener, NULL);
|
||||||
wl_display_dispatch(display);
|
|
||||||
wl_display_roundtrip(display);
|
wl_display_roundtrip(display);
|
||||||
|
|
||||||
if (compositor == NULL) {
|
if (compositor == NULL) {
|
||||||
|
@ -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, ®istry_listener, NULL);
|
wl_registry_add_listener(registry, ®istry_listener, NULL);
|
||||||
wl_display_dispatch(display);
|
|
||||||
wl_display_roundtrip(display);
|
wl_display_roundtrip(display);
|
||||||
|
|
||||||
if (output_power_manager == NULL) {
|
if (output_power_manager == NULL) {
|
||||||
|
@ -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, ®istry_listener, NULL);
|
wl_registry_add_listener(registry, ®istry_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);
|
||||||
|
@ -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, ®istry_listener, NULL);
|
wl_registry_add_listener(registry, ®istry_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 */
|
||||||
|
@ -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, ®istry_listener, NULL);
|
wl_registry_add_listener(registry, ®istry_listener, NULL);
|
||||||
wl_display_dispatch(display);
|
|
||||||
wl_display_roundtrip(display);
|
wl_display_roundtrip(display);
|
||||||
|
|
||||||
if (dmabuf == NULL) {
|
if (dmabuf == NULL) {
|
||||||
|
@ -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, ®istry_listener, NULL);
|
wl_registry_add_listener(registry, ®istry_listener, NULL);
|
||||||
wl_display_dispatch(display);
|
|
||||||
wl_display_roundtrip(display);
|
wl_display_roundtrip(display);
|
||||||
|
|
||||||
if (shm == NULL) {
|
if (shm == NULL) {
|
||||||
|
@ -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, ®istry_listener, NULL);
|
wl_registry_add_listener(registry, ®istry_listener, NULL);
|
||||||
wl_display_dispatch(display);
|
|
||||||
wl_display_roundtrip(display);
|
wl_display_roundtrip(display);
|
||||||
|
|
||||||
if (compositor == NULL) {
|
if (compositor == NULL) {
|
||||||
|
@ -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, ®istry_listener, NULL);
|
wl_registry_add_listener(registry, ®istry_listener, NULL);
|
||||||
wl_display_dispatch(display);
|
|
||||||
wl_display_roundtrip(display);
|
wl_display_roundtrip(display);
|
||||||
|
|
||||||
if (compositor == NULL) {
|
if (compositor == NULL) {
|
||||||
|
@ -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, ®istry_listener, NULL);
|
wl_registry_add_listener(registry, ®istry_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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user