From 5f3b5e77c20fe3f9867a28b213cae685a4d72f2e Mon Sep 17 00:00:00 2001 From: Changyeon Lee Date: Thu, 18 Jan 2024 12:10:53 +0900 Subject: [PATCH] e_hwc_window: add e_hwc_window_comp_override_set Change-Id: Ib68ab414ac1e2ba80d4f39b443d85fc5d41cadf5 --- src/bin/e_comp.c | 10 +++++++++- src/bin/e_hwc_window.c | 12 ++++++++++++ src/bin/e_hwc_window_intern.h | 2 ++ src/include/e_hwc_window.h | 2 ++ 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/src/bin/e_comp.c b/src/bin/e_comp.c index cc9f2f1..10d44ec 100644 --- a/src/bin/e_comp.c +++ b/src/bin/e_comp.c @@ -714,6 +714,9 @@ e_comp_client_override_del(E_Client *ec) { ec->comp_override = 0; e_comp_render_queue(); + + if (ec->hwc_window) + e_hwc_window_comp_override_set(ec->hwc_window, EINA_FALSE); } } @@ -724,7 +727,12 @@ e_comp_client_override_add(E_Client *ec) ec->comp_override++; if (ec->comp_override > 0) - e_comp_hwc_client_end(ec, __FUNCTION__); + { + if (ec->hwc_window) + e_hwc_window_comp_override_set(ec->hwc_window, EINA_TRUE); + + e_comp_hwc_client_end(ec, __FUNCTION__); + } } EINTERN E_Comp * diff --git a/src/bin/e_hwc_window.c b/src/bin/e_hwc_window.c index ab83cde..69eea1e 100644 --- a/src/bin/e_hwc_window.c +++ b/src/bin/e_hwc_window.c @@ -3354,3 +3354,15 @@ e_hwc_window_below_transparent_obj_set(E_Hwc_Window *hwc_window, Eina_Bool set) EHWINF("Unset below_transparent_obj", hwc_window->ec, hwc_window->hwc, hwc_window); } } + +EINTERN Eina_Bool +e_hwc_window_comp_override_set(E_Hwc_Window *hwc_window, Eina_Bool set) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(hwc_window, EINA_FALSE); + + if (hwc_window->comp_override == set) return EINA_TRUE; + + hwc_window->comp_override = set; + + return EINA_TRUE; +} diff --git a/src/bin/e_hwc_window_intern.h b/src/bin/e_hwc_window_intern.h index b155ad3..ba9912c 100644 --- a/src/bin/e_hwc_window_intern.h +++ b/src/bin/e_hwc_window_intern.h @@ -101,4 +101,6 @@ EINTERN Eina_Bool e_hwc_window_presentation_callback_call(E_Hwc_ EINTERN void e_hwc_window_below_transparent_obj_set(E_Hwc_Window *hwc_window, Eina_Bool set); +EINTERN Eina_Bool e_hwc_window_comp_override_set(E_Hwc_Window *hwc_window, Eina_Bool set); + #endif diff --git a/src/include/e_hwc_window.h b/src/include/e_hwc_window.h index 8871f7c..8b3900f 100644 --- a/src/include/e_hwc_window.h +++ b/src/include/e_hwc_window.h @@ -111,6 +111,8 @@ struct _E_Hwc_Window Evas_Object *below_transparent_obj; Eina_Bool queue_unset_waiting; + + Eina_Bool comp_override; }; struct _E_Hwc_Window_Target -- 2.7.4