e_process: fix bug for handling active window 57/298457/1
authorDoyoun Kang <doyoun.kang@samsung.com>
Thu, 7 Sep 2023 04:46:59 +0000 (13:46 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Thu, 7 Sep 2023 07:22:47 +0000 (16:22 +0900)
There was a bug that the active_win was not updated even though it was deleted.
This patch resolve it.

Change-Id: Id8305831923b875db97e166179e908a8966a4c02

src/bin/e_process.c

index c0244fa..6c8e826 100644 (file)
@@ -148,18 +148,23 @@ _e_process_client_info_del(E_Client *ec)
    E_Process *pinfo = NULL;
    pid_t pid;
    Eina_Bool visible;
+   Eina_Bool is_active_ec = EINA_FALSE;
 
    if (!ec) return;
+   if (_e_process_manager->active_win == ec)
+     {
+        _e_process_manager->active_win = NULL;
+        is_active_ec = EINA_TRUE;
+     }
 
    pid = ec->netwm.pid;
-   if (pid <=0) return;
+   if (pid <= 0) return;
 
    pinfo = _e_process_find(_e_process_manager, pid);
    if (!pinfo) return;
 
-   if (_e_process_manager->active_win == ec)
+   if (is_active_ec)
      {
-        _e_process_manager->active_win = NULL;
         ELOGF("PROCESS", "ACTION DEACTIVATE. PID:%d", NULL, pid);
         _e_process_action_change(pinfo, E_PROCESS_ACT_DEACTIVATE);
      }