From d282e79be96c4ad9577466e7d809d77d0a5229bf Mon Sep 17 00:00:00 2001 From: Doyoun Kang Date: Fri, 8 Oct 2021 12:32:38 +0900 Subject: [PATCH] e_policy: fix bug for uniconify window by wm 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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bin/e_policy.c b/src/bin/e_policy.c index 8d896c9..af8766f 100644 --- a/src/bin/e_policy.c +++ b/src/bin/e_policy.c @@ -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)) { -- 2.7.4