From 6413a0a4cdd781569f759eaf5f3c8ab6b586d81c Mon Sep 17 00:00:00 2001 From: SooChan Lim Date: Thu, 21 Jul 2022 08:30:20 +0900 Subject: [PATCH] indicator: create and bind global resource with version info Change-Id: Iaa20162c9a2d6a918e72e5071f7f7d809902f33e --- src/indicator/indicator.c | 2 +- tests/tc_indicator.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/indicator/indicator.c b/src/indicator/indicator.c index 23f0e9f..b08dae5 100644 --- a/src/indicator/indicator.c +++ b/src/indicator/indicator.c @@ -83,7 +83,7 @@ ds_tizen_indicator_create(struct wl_display *display) } indicator->global = wl_global_create(display, &tizen_indicator_interface, - 1, indicator, indicator_bind); + TIZEN_INDICATOR_VERSION, indicator, indicator_bind); if (!indicator->global) { ds_err("wl_global_create() failed. tizen_indicator_interface"); free(indicator); diff --git a/tests/tc_indicator.cpp b/tests/tc_indicator.cpp index 7585496..837aa3a 100644 --- a/tests/tc_indicator.cpp +++ b/tests/tc_indicator.cpp @@ -4,6 +4,7 @@ #include #include +#define TIZEN_INDICATOR_VERSION 1 class MockIndicatorCompositor : public MockCompositor { public: @@ -331,7 +332,7 @@ client_registry_cb_global(void *data, struct wl_registry *registry, client->SetWlCompositor(compositor_res); } else if (!strcmp(interface, "tizen_indicator")) { tizen_indicator = (struct tizen_indicator *)wl_registry_bind(registry, - name, &tizen_indicator_interface, 1); + name, &tizen_indicator_interface, TIZEN_INDICATOR_VERSION); if (tizen_indicator == nullptr) { ds_err("wl_registry_bind() failed. tizen_indicator resource."); return; -- 2.7.4