X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=grpc-proxy%2Fmain-grpc.cpp;h=db3303270d0376051186924d204b23641dee2e3f;hb=ec6f2d31293d8680a1f6dab8f53949b848bbae08;hp=b86f3d877d0774e6a4ef8d63bb65295e28ab7c86;hpb=ae3ef78cb1a01b690917eb8d93a3e68517a7a93d;p=src%2Fagl-compositor.git diff --git a/grpc-proxy/main-grpc.cpp b/grpc-proxy/main-grpc.cpp index b86f3d8..db33032 100644 --- a/grpc-proxy/main-grpc.cpp +++ b/grpc-proxy/main-grpc.cpp @@ -272,9 +272,8 @@ global_remove(void *data, struct wl_registry *reg, uint32_t id) (void) id; for (std::list::iterator it = sh->globals.begin(); - it != sh->globals.end(); it++) { - sh->globals.erase(it); - } + it != sh->globals.end(); it = sh->globals.erase(it)) + ; } static const struct wl_registry_listener registry_listener = { @@ -352,7 +351,7 @@ register_shell_ext(void) if (it->interface_name == "agl_shell") { sh->shell = static_cast(wl_registry_bind(registry, it->id, - &agl_shell_interface, std::min(static_cast(10), + &agl_shell_interface, std::min(static_cast(11), it->version)) ); agl_shell_add_listener(sh->shell, &shell_listener, sh); @@ -395,9 +394,8 @@ destroy_shell_data(struct shell_data *sh) destroy_output(w_output); for (std::list::iterator it = sh->globals.begin(); - it != sh->globals.end(); it++) { - sh->globals.erase(it); - } + it != sh->globals.end(); it = sh->globals.erase(it)) + ; wl_display_flush(sh->wl_display); wl_display_disconnect(sh->wl_display);