e_policy: send iconify state change event when ec vis turn on and didn't send event. 47/248947/1
authorJunseok, Kim <juns.kim@samsung.com>
Thu, 3 Dec 2020 06:12:04 +0000 (15:12 +0900)
committerJunSeok Kim <juns.kim@samsung.com>
Thu, 3 Dec 2020 10:58:52 +0000 (10:58 +0000)
Added last_sent_type for store latest iconify_state_change event.
and send iconify_state_change event when ec turn to visibility on and didn't send the event.

Change-Id: I74c33b4ade57c095c2287273d54a4ae1237666c2
Signed-off-by: Junseok, Kim <juns.kim@samsung.com>
(cherry picked from commit 6a96f56019e76cc8bf5f3affb51afa41858ed7a0)

src/bin/e_client.h
src/bin/e_policy.c
src/bin/e_policy_wl.c

index 0ba3e9bda820aa43a980fc23d4eb0f13908aa330..f4dadea3f4f2334801096a52a56b5fbdec33a242 100644 (file)
@@ -886,6 +886,7 @@ struct E_Client
       unsigned char skip_by_remote : 1;    // skip iconify by remote surface client
       unsigned char deiconify_update : 1;  // wait client render if deiconify_update is 1
       unsigned char buffer_flush : 1;      // 0: no flush, 1: flush buffer when iconify
+      unsigned char last_sent_iconic : 1;  // 0: uniconify, 1: iconify
    } exp_iconify;
 
    struct
index 424bd4ae04e301485172a39f91688389a902ea62..7969f1270222f929b1d22a39ec667e1e0cdc71bc 100644 (file)
@@ -884,6 +884,8 @@ _e_policy_cb_hook_client_visibility(void *d EINA_UNUSED, E_Client *ec)
         if (ec->visibility.obscured == E_VISIBILITY_UNOBSCURED)
           {
              e_policy_client_uniconify_by_visibility(ec);
+             if ((ec->iconic == 0) && (ec->exp_iconify.last_sent_iconic != 0))
+               e_policy_wl_iconify_state_change_send(ec, 0);
              if (ec->visibility.last_sent_type != E_VISIBILITY_PRE_UNOBSCURED)
                {
                   ELOGF("POL_VIS", "SEND pre-unobscured visibility event", ec);
index b82a46a4c95b7ade3e285d97203ed8e22be8e49e..7b40a4c17746d1ad0bdadccd2ae6cf2d31ad42ba 100644 (file)
@@ -1169,6 +1169,7 @@ e_policy_wl_iconify_state_change_send(E_Client *ec, int iconic)
                 "SEND     |iconic:%d  |argb:%d       |sur:%p",
                 ec,
                 iconic, ec->argb, psurf->surf);
+          ec->exp_iconify.last_sent_iconic = iconic;
           break;
        }
    eina_iterator_free(it);