e_hwc_windows: set the DEVICE type by force when the ec is not redirected.
authorSooChan Lim <sc1.lim@samsung.com>
Thu, 14 Mar 2019 09:45:38 +0000 (18:45 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Fri, 12 Apr 2019 10:00:22 +0000 (19:00 +0900)
That the ec is not redirected means that E20 does not care about the ec.
Therefore, E20 has no right to set the CLIENT type. It just let it go
to set the DEVICE type and make the tdm backend decided the hwc policy.

Change-Id: I5298d2a044f3c7ac08da2052321adfd04f8a2dee

src/bin/e_hwc_windows.c

index 2d8e269323b562b92482a273d61e923a74b6aa2f..0e2f8b06ac14f42dbe210ac4b7e0253e0305d611 100644 (file)
@@ -1684,6 +1684,7 @@ _e_hwc_windows_visible_windows_states_update(E_Hwc *hwc)
    Eina_List *visible_windows = NULL;
    Eina_List *l;
    E_Hwc_Window *hwc_window = NULL;
+   E_Client *ec = NULL;
 
    /* get the visible ecs */
    visible_windows = hwc->visible_windows;
@@ -1701,10 +1702,20 @@ _e_hwc_windows_visible_windows_states_update(E_Hwc *hwc)
                   continue;
                }
 
-             e_hwc_window_state_set(hwc_window, E_HWC_WINDOW_STATE_CLIENT, EINA_TRUE);
-
-             EHWSTRACE("   ehw:%p -- {%25s} is NOT hwc_acceptable.",
-                     hwc_window->ec, hwc_window, e_hwc_window_name_get(hwc_window));
+             ec = hwc_window->ec;
+             if (!ec) continue;
+             if (ec->redirected)
+               {
+                  e_hwc_window_state_set(hwc_window, E_HWC_WINDOW_STATE_CLIENT, EINA_TRUE);
+                  EHWSTRACE("   ehw:%p -- {%25s} is NOT hwc_acceptable.",
+                          hwc_window->ec, hwc_window, e_hwc_window_name_get(hwc_window));
+               }
+             else
+               {
+                  e_hwc_window_state_set(hwc_window, E_HWC_WINDOW_STATE_DEVICE, EINA_TRUE);
+                  EHWSTRACE("   ehw:%p -- {%25s} is Force hwc_acceptable(Redirected FALSE).",
+                          hwc_window->ec, hwc_window, e_hwc_window_name_get(hwc_window));
+               }
           }
      }
    else
@@ -1728,7 +1739,18 @@ _e_hwc_windows_visible_windows_states_update(E_Hwc *hwc)
              if (e_hwc_window_device_state_available_check(hwc_window))
                e_hwc_window_state_set(hwc_window, E_HWC_WINDOW_STATE_DEVICE, EINA_TRUE);
              else
-               e_hwc_window_state_set(hwc_window, E_HWC_WINDOW_STATE_CLIENT, EINA_TRUE);
+               {
+                  ec = hwc_window->ec;
+                  if (!ec) continue;
+                  if (ec->redirected)
+                    e_hwc_window_state_set(hwc_window, E_HWC_WINDOW_STATE_CLIENT, EINA_TRUE);
+                  else
+                    {
+                       e_hwc_window_state_set(hwc_window, E_HWC_WINDOW_STATE_DEVICE, EINA_TRUE);
+                       EHWSTRACE("   ehw:%p -- {%25s} is Force hwc_acceptable(Redirected FALSE).",
+                               hwc_window->ec, hwc_window, e_hwc_window_name_get(hwc_window));
+                    }
+               }
           }
      }
 }