e_policy_zone: check uniconify_render while calculating visibility 00/317000/2
authorDoyoun Kang <doyoun.kang@samsung.com>
Wed, 18 Dec 2024 06:00:24 +0000 (15:00 +0900)
committerDoyoun Kang <doyoun.kang@samsung.com>
Mon, 23 Dec 2024 02:29:55 +0000 (02:29 +0000)
There was an issue where the visibility state changed several times in the scenario where the window requested activation after requesting iconify as follows:

1. When the enlightenment received the activate request, pre-visibility is delivered to the application window.
2. Application receives this event and changes its state to RESUME.
3. To process the activate (uniconify) event, enlightenment waits for rendering of the application. (The activate (and uniconify) is pended)
4. In this situation, when the visibility calculation is performed, since the window is still in an iconic state, the visibility of window changes to a fully-obscured state.
5. Application receives this event and changes its state to PAUSE.
6. After that, when the Application window performs rendering, the visibility of the application window is changed to unobscured state.
7. As a result, application changes its state to RESUME again.

To resolve this problem, we modified the visibility calculation to check for the uniconify_pending status.
If it's in the pending state, the visibility calculation will be skipped.

Change-Id: Ifa02ecfb27b37d64265ab77db146c404cf843b55

src/bin/windowmgr/e_policy_zone.c

index 2a10a6a0b183e9296af3a73e682839f3fe2ea4f9..a0be9574d20c1bb11dee6a3fce42c6d6c0d37157 100644 (file)
@@ -1,6 +1,7 @@
 #include "e_policy_zone_intern.h"
 #include "e_zone_intern.h"
 #include "e_policy_intern.h"
+#include "e_policy_visibility_intern.h"
 #include "e_client_intern.h"
 #include "e_input_device_intern.h"
 #include "e_comp_wl_intern.h"
@@ -1478,12 +1479,21 @@ e_policy_zone_visibility_calculate(E_Zone *zone)
                   /* obscured case */
                   if (e_client_visibility_get(ec) != E_VISIBILITY_FULLY_OBSCURED)
                     {
-                       /* previous state is unobscured: -1 or 0 */
-                       e_client_visibility_set(ec, E_VISIBILITY_FULLY_OBSCURED);
-                       ec->visibility.changed = 1;
-                       ELOGF("POL_VIS", "CLIENT VIS OFF. argb:%d, opaque:%2d, frame_v:%d, canvas_v:%d, calc_r:%d(%d), ignore_geometry:%d, show_p:%d, geo(%d,%d,%dx%d)",
-                             ec, ec->argb, ec->visibility.opaque,
-                             ec_frame_visible, canvas_vis, calc_region, calc_skip_type, ec->visibility.ignore_geometry, skip_by_pending_show, x, y, w, h);
+                       if (e_policy_visibility_client_is_uniconify_render_running(ec))
+                         {
+                            ELOGF("POL_VIS", "CLIENT VIS OFF-SKIP. argb:%d, opaque:%2d, frame_v:%d, canvas_v:%d, calc_r:%d(%d), ignore_geometry:%d, show_p:%d, geo(%d,%d,%dx%d)",
+                                  ec, ec->argb, ec->visibility.opaque,
+                                  ec_frame_visible, canvas_vis, calc_region, calc_skip_type, ec->visibility.ignore_geometry, skip_by_pending_show, x, y, w, h);
+                         }
+                       else
+                         {
+                            /* previous state is unobscured: -1 or 0 */
+                            e_client_visibility_set(ec, E_VISIBILITY_FULLY_OBSCURED);
+                            ec->visibility.changed = 1;
+                            ELOGF("POL_VIS", "CLIENT VIS OFF. argb:%d, opaque:%2d, frame_v:%d, canvas_v:%d, calc_r:%d(%d), ignore_geometry:%d, show_p:%d, geo(%d,%d,%dx%d)",
+                                  ec, ec->argb, ec->visibility.opaque,
+                                  ec_frame_visible, canvas_vis, calc_region, calc_skip_type, ec->visibility.ignore_geometry, skip_by_pending_show, x, y, w, h);
+                         }
                     }
                }
           }