Revert "Fix visibility handling" 83/148683/1
authorHwanKyu Jhun <h.jhun@samsung.com>
Fri, 8 Sep 2017 09:43:27 +0000 (09:43 +0000)
committerHwanKyu Jhun <h.jhun@samsung.com>
Fri, 8 Sep 2017 09:43:27 +0000 (09:43 +0000)
This reverts commit d06039ec5f39e79c169321d4fc01f34df836e145.

Change-Id: I6be33bdc2d37c996a4e6b388522141a849226ec2

src/appcore-efl.c

index f101d43141beac87189b47e328fb66abc2acfd46..f154538d129ecff98e60ee8d5af5e97dbf5672c5 100644 (file)
@@ -111,7 +111,7 @@ static const char *_as_name[] = {
        [AS_DYING] = "DYING",
 };
 
-static int b_active = -1;
+static bool b_active = FALSE;
 static bool first_launch = TRUE;
 
 struct win_node {
@@ -858,9 +858,9 @@ static Eina_Bool __hide_cb(void *data, int type, void *event)
        if (__find_win((unsigned int)ev->win)) {
                __delete_win((unsigned int)ev->win);
                bvisibility = __check_visible();
-               if (!bvisibility && b_active != 0) {
+               if (!bvisibility && b_active == TRUE) {
                        _DBG(" Go to Pasue state \n");
-                       b_active = 0;
+                       b_active = FALSE;
                        __do_app(AE_PAUSE, data, NULL);
                }
        }
@@ -899,14 +899,14 @@ static Eina_Bool __visibility_cb(void *data, int type, void *event)
 
        _DBG("bvisibility %d, b_active %d", bvisibility, b_active);
 
-       if (bvisibility && b_active != 1) {
+       if (bvisibility && b_active == FALSE) {
                _DBG(" Go to Resume state\n");
-               b_active = 1;
+               b_active = TRUE;
                __do_app(AE_RESUME, data, NULL);
 
-       } else if (!bvisibility && b_active != 0) {
+       } else if (!bvisibility && b_active == TRUE) {
                _DBG(" Go to Pasue state \n");
-               b_active = 0;
+               b_active = FALSE;
                __do_app(AE_PAUSE, data, NULL);
        } else
                _DBG(" No change state \n");
@@ -925,9 +925,9 @@ static Eina_Bool __pre_visibility_cb(void *data, int type, void *event)
                __update_win((unsigned int)ev->win, 0, false);
                bvisibility = __check_visible();
                _DBG("bvisibility %d, b_active %d", bvisibility, b_active);
-               if (bvisibility && b_active != 1) {
+               if (bvisibility && b_active == FALSE) {
                        _DBG("Go to Resume state\n");
-                       b_active = 1;
+                       b_active = TRUE;
                        __do_app(AE_RESUME, data, NULL);
                }
        }