GVariant *body;
gint32 focused_pid = 0;
+ _W("call aul_window_get_focused_pid()");
if (system_conn == NULL) {
conn = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &err);
if (conn == NULL) {
G_DBUS_SEND_MESSAGE_FLAGS_NONE, -1, NULL, NULL, &err);
if (!reply) {
+ _E("reply is null");
if (err != NULL) {
_E("Failed to get info [%s]", err->message);
g_error_free(err);
body = g_dbus_message_get_body(reply);
if (!body) {
res = -1;
+ _E("Body is null");
goto out;
}
g_variant_get(body, "(i)", &focused_pid);
*pid = (pid_t)focused_pid;
+ _W("result = %d", focused_pid);
out:
if (msg)
g_object_unref(msg);