e_info_server: set deactive hwc of all output in hwc option 18/271318/1
authorChangyeon Lee <cyeon.lee@samsung.com>
Tue, 8 Feb 2022 04:42:54 +0000 (13:42 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Fri, 18 Feb 2022 02:15:44 +0000 (11:15 +0900)
Change-Id: Ieb6a37836bb467dcb99b286899875de26fb736df

src/bin/e_info_server.c

index db4fb01..ee248e0 100644 (file)
@@ -5075,6 +5075,8 @@ e_info_server_cb_hwc(const Eldbus_Service_Interface *iface EINA_UNUSED, const El
 {
    Eldbus_Message *reply = eldbus_message_method_return_new(msg);
    uint32_t info;
+   E_Output *output;
+   Eina_List *l;
 
    if (!eldbus_message_arguments_get(msg, "i", &info))
      {
@@ -5088,14 +5090,19 @@ e_info_server_cb_hwc(const Eldbus_Service_Interface *iface EINA_UNUSED, const El
         return reply;
      }
 
+   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp, reply);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(e_comp->e_comp_screen, reply);
+
    switch (info)
      {
       case 0:
-        e_comp_hwc_deactive_set(EINA_TRUE);
+        EINA_LIST_FOREACH(e_comp->e_comp_screen->outputs, l, output)
+          e_hwc_deactive_set(output->hwc, EINA_TRUE);
         break;
 
       case 1:
-        e_comp_hwc_deactive_set(EINA_FALSE);
+        EINA_LIST_FOREACH(e_comp->e_comp_screen->outputs, l, output)
+          e_hwc_deactive_set(output->hwc, EINA_FALSE);
         break;
 
       default: