*
* @since_tizen 7.0
*/
- std::vector<std::shared_ptr<TizenWindow>> getTizenWindowInfo() const;
+ void getTizenWindowInfo(std::vector<std::shared_ptr<TizenWindow>> &mTizenWindows) const;
private:
efl_util_inputgen_h mFakeTouchHandle;
*/
Size2D<int> mScreenSize;
static std::mutex CaptureMutex;
- static std::vector<std::shared_ptr<TizenWindow>> mTizenWindows;
};
}
#define WM_METHOD_NAME_INFO "GetVisibleWinInfo_v3"
std::mutex TizenDeviceImpl::CaptureMutex = std::mutex{};
-std::vector<std::shared_ptr<TizenWindow>> TizenDeviceImpl::mTizenWindows;
static GDBusConnection *system_conn;
TizenDeviceImpl::TizenDeviceImpl()
std::vector<std::shared_ptr<AccessibleNode>> TizenDeviceImpl::getWindowRoot() const
{
LOGI("Request window info");
- getTizenWindowInfo();
+
+ std::vector<std::shared_ptr<TizenWindow>> mTizenWindows{};
+ getTizenWindowInfo(mTizenWindows);
std::vector<std::shared_ptr<AccessibleNode>> ret{};
std::unordered_map<int, std::shared_ptr<AccessibleApplication>> pidToAppNode{};
return ret;
}
-std::vector<std::shared_ptr<TizenWindow>> TizenDeviceImpl::getTizenWindowInfo() const
+void TizenDeviceImpl::getTizenWindowInfo(std::vector<std::shared_ptr<TizenWindow>> &mTizenWindows) const
{
GError *err = NULL;
GDBusMessage *msg;
int layer;
char *name;
- mTizenWindows.clear();
-
if (system_conn == NULL) {
conn = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &err);
if (conn == NULL) {
LOGE("g_bus_get_sync() is failed. %s", err->message);
g_error_free(err);
- return mTizenWindows;
+ return;
}
system_conn = conn;
}
WM_METHOD_NAME_INFO);
if (msg == NULL) {
LOGE("g_dbus_message_new_method_call() is failed.");
- return mTizenWindows;
+ return;
}
reply = g_dbus_connection_send_message_with_reply_sync(system_conn, msg,
g_object_unref(msg);
if (reply)
g_object_unref(reply);
-
- return mTizenWindows;
}