e_policy: fix bug for uniconify window by wm 55/265055/2
authorDoyoun Kang <doyoun.kang@samsung.com>
Fri, 8 Oct 2021 03:32:38 +0000 (12:32 +0900)
committerDoyoun Kang <doyoun.kang@samsung.com>
Fri, 8 Oct 2021 04:31:11 +0000 (04:31 +0000)
There was a bug that the fully-obscured partial window run uniconify_window by wm
when the new alpha opaque window was launched.

Suppose that the window stack is as below.
[top] WinA (full size - 0,0,1920x1080) - WinB (partial - 1,1,1920x1280) [bottom]
If we launch new WinC which set an alpha opaque, window stack should be as below.
[top] WinC (full size, 32bit, alpha opaque) - WinA - WinB [bottom]
In this case, WinB must not change visibility and iconic state.

But, e changed WinB's iconic state to uniconic and sent a pre-unobscured event.
This was because we didn't clip the geometry of the window by e_zone's geometry.

So, we add code to clip the window's geometry by the zone's geometry.

Change-Id: Ie3de71ae4c6c1b35e15f5ca478b3c2cac94dd08a

src/bin/e_policy.c

index 8d896c9..af8766f 100644 (file)
@@ -929,6 +929,8 @@ _e_policy_cb_hook_client_visibility(void *d EINA_UNUSED, E_Client *ec)
              if (ec->zone->display_state == E_ZONE_DISPLAY_STATE_ON)
                {
                   e_client_geometry_get(ec, &ex, &ey, &ew, &eh);
+                  // crop ec size with zone size
+                  E_RECTS_CLIP_TO_RECT(ex, ey, ew, eh, ec->zone->x, ec->zone->y, ec->zone->w, ec->zone->h);
 
                   if (!E_INTERSECTS(ec->zone->x, ec->zone->y, ec->zone->w, ec->zone->h, ex, ey, ew, eh))
                     {