add to check availability of X11 using ecore_x_init api befor starting animation.
authorByungsoo Kim <bs1770.kim@samsung.com>
Tue, 2 Apr 2013 04:53:14 +0000 (13:53 +0900)
committerByungsoo Kim <bs1770.kim@samsung.com>
Tue, 2 Apr 2013 04:53:14 +0000 (13:53 +0900)
When the system was power off, X11 window system could be terminated before starting poweroff animation.
Therefore, poweroff animation should check availability of X11.

Change-Id: I084786ac12e93cbe1e7e64f956ab0592290c6cf9
Signed-off-by: Byungsoo Kim <bs1770.kim@samsung.com>
src/boot-animation.c

index f00b458..be6eb5b 100755 (executable)
@@ -247,6 +247,11 @@ int main(int argc, char *argv[])
        args.argv = argv;
        args.msg = NULL;
 
+       if (ecore_x_init(NULL) == NULL) {
+               fprintf(stderr, "Cannot connect to X11 display\n");
+               return 0;
+       }
+
        elm_init(argc, argv);
 
        vconf_notify_key_changed("memory/boot-animation/restart", restart_cb,