summaryrefslogtreecommitdiff
path: root/src/bin/main.c
diff options
context:
space:
mode:
authorYakov Goldberg <yakov.g@samsung.com>2013-12-01 15:36:24 +0200
committerYakov Goldberg <yakov.g@samsung.com>2013-12-02 15:10:01 +0200
commit64f209307ca0d062c0f85d5b8790638ccf68ce53 (patch)
treecd390713a0e0f91c2e1f9c3eaadf40647f704950 /src/bin/main.c
parent53689cc75c85e70fc871c1e116e074957d9e2563 (diff)
Managing session deletion in simulation mode
- when object is created, callback on evas obj del is assigned to it, in order to be able to session_eo_set(NULL). ('back' button in target window) - if we press X on target's(emulator's) window, all simulated content is deleted, and session_del() is called. - only when simulating "Desktop" mode from cmd, need to enforce deletion.
Diffstat (limited to 'src/bin/main.c')
-rw-r--r--src/bin/main.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/bin/main.c b/src/bin/main.c
index 05347b0..996a34b 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -49,6 +49,8 @@ _simulate(const char *filename, const char *target_name)
49 goto end; 49 goto end;
50 50
51 gui_context_validate(ctx); 51 gui_context_validate(ctx);
52 /* This session will be deleted by callbacks,
53 * when simulated windows or target win will be closed. */
52 Gui_Session *session = simulator_ctx_call(ctx, target_name); 54 Gui_Session *session = simulator_ctx_call(ctx, target_name);
53 if (!session) goto end; 55 if (!session) goto end;
54 56
@@ -57,7 +59,10 @@ _simulate(const char *filename, const char *target_name)
57 elm_exit(); 59 elm_exit();
58 60
59end: 61end:
60 if (session) session_del(session); 62 /* FIXME: session_del() is not called in callbacks when target is Desktop
63 * So force to delete it here.*/
64 if (!strcmp(target_name, "Desktop"))
65 session_del(session);
61 gui_context_del(ctx); 66 gui_context_del(ctx);
62 return 0; 67 return 0;
63} 68}