From 0f3c9c32d88d2349c3f6793e18606a0babc555aa Mon Sep 17 00:00:00 2001 From: Junseok Kim Date: Fri, 11 Nov 2022 10:47:34 +0900 Subject: [PATCH] e_client: Modify to have focus even the window is in defer_focus_stack There was a bug that window couldn't get focus even if the window requests activate. For more detail, there're 2 windows, that one is partial sized, above layer window(winA) like as floating window, and the other is full sized, normal layer window(winB) like as homescreen. First, winB gets focus by touch as launching new app icon of the user. By the user operation, a new fullsized, normal layer window (winC) launchs with create, show, and activate request. Next, the winB fully obscured by new window winC. In this timing, the winC is not visible but winB prepares hide by wm. When doing hide, the e_client_revert_focus called for find previously focused window. The winC is in defer focus stack but it skiped due to it isn't visible yet. Finally, the winC couldn't get focus even if it requested activate and focus given to winA. For fix this problem, check the window is in defer_focus_stack when focusable check. Change-Id: I34e68d41d2cfb183d4eab956abf6472708e295bf --- src/bin/e_client.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bin/e_client.c b/src/bin/e_client.c index 010fa12096..c7e636835b 100644 --- a/src/bin/e_client.c +++ b/src/bin/e_client.c @@ -923,7 +923,8 @@ _e_client_focus_can_take(E_Client *ec) if (ec->visibility.obscured == E_VISIBILITY_UNKNOWN) { - if (!evas_object_visible_get(ec->frame)) + if (!evas_object_visible_get(ec->frame) && + !eina_list_data_find(defer_focus_stack, ec)) return EINA_FALSE; } } -- 2.34.1