Fix notify event sequence
[platform/core/appfw/appcore-widget.git] / src / base / widget_base.c
index 17edb5d..16928b9 100644 (file)
@@ -1392,13 +1392,12 @@ static void __multiwindow_instance_create(
                __instance_drop(instance_h);
        } else {
                LOGD("%s is created", id);
+               aul_widget_instance_add(class_id, id);
                ret = __send_update_status(class_id, id,
                        WIDGET_INSTANCE_EVENT_CREATE, 0, NULL);
                if (ret < 0)
                        LOGE("Fail to send create status (%d) ", ret);
 
-               aul_widget_instance_add(class_id, id);
-
                ret = bundle_get_byte(b, WIDGET_K_PERIOD, (void **)&period,
                                &size);
                if (ret == BUNDLE_ERROR_NONE && *period > 0) {