int iconic;
int frame_visible; //ec->frame obj visible get
int focused;
- int hwc;
- int pl_zpos;
+ int hwc; // hwc enable/disable
+ int hwc_policy; // hwc policy
+ int pl_zpos; // hwc value : (hwc_windows: hwc window state) (hwc_planes: zpos of the plane)
Ecore_Window parent_id;
const char *layer_name; // layer name
Eina_Bool has_input_region;
double fps;
} E_Fps_Info;
-#define VALUE_TYPE_FOR_TOPVWINS "uuisiiiiibbbiiibbiiusbb"
+#define VALUE_TYPE_FOR_TOPVWINS "uuisiiiiibbbiiibbiiiusbb"
#define VALUE_TYPE_REQUEST_RESLIST "ui"
#define VALUE_TYPE_REPLY_RESLIST "ssi"
#define VALUE_TYPE_FOR_INPUTDEV "ssi"
}
static E_Win_Info *
-_e_win_info_new(Ecore_Window id, uint32_t res_id, int pid, Eina_Bool alpha, int opaque, const char *name, int x, int y, int w, int h, int layer, int visible, int mapped, int visibility, int iconic, int frame_visible, int focused, int hwc, int pl_zpos, Ecore_Window parent_id, const char *layer_name, Eina_Bool has_input_region, Eina_Bool transformed)
+_e_win_info_new(Ecore_Window id, uint32_t res_id, int pid, Eina_Bool alpha, int opaque, const char *name,
+ int x, int y, int w, int h, int layer, int visible, int mapped, int visibility, int iconic,
+ int frame_visible, int focused, int hwc, int hwc_policy, int pl_zpos, Ecore_Window parent_id,
+ const char *layer_name, Eina_Bool has_input_region, Eina_Bool transformed)
{
E_Win_Info *win = NULL;
win->iconic = iconic;
win->focused = focused;
win->hwc = hwc;
+ win->hwc_policy = hwc_policy;
win->pl_zpos = pl_zpos;
win->parent_id = parent_id;
win->layer_name = eina_stringshare_add(layer_name);
{
const char *win_name;
const char *layer_name;
- int x, y, w, h, layer, visibility, opaque, hwc, pl_zpos;
+ int x, y, w, h, layer, visibility, opaque, hwc, hwc_policy, pl_zpos;
Eina_Bool visible, mapped, alpha, iconic, focused, frame_visible, transformed;
Ecore_Window id, parent_id;
uint32_t res_id;
&frame_visible,
&focused,
&hwc,
+ &hwc_policy,
&pl_zpos,
&parent_id,
&layer_name,
continue;
}
- win = _e_win_info_new(id, res_id, pid, alpha, opaque, win_name, x, y, w, h, layer, visible, mapped, visibility, iconic, frame_visible, focused, hwc, pl_zpos, parent_id, layer_name, has_input_region, transformed);
+ win = _e_win_info_new(id, res_id, pid, alpha, opaque, win_name, x, y, w, h,
+ layer, visible, mapped, visibility, iconic, frame_visible,
+ focused, hwc, hwc_policy, pl_zpos, parent_id, layer_name,
+ has_input_region, transformed);
e_info_client.win_list = eina_list_append(e_info_client.win_list, win);
}
}
res = eldbus_message_error_get(msg, &name, &text);
EINA_SAFETY_ON_TRUE_GOTO(res, finish);
- res = eldbus_message_arguments_get(msg, "a("VALUE_TYPE_FOR_TOPVWINS")", &array);
+ res = eldbus_message_arguments_get(msg, "iia("VALUE_TYPE_FOR_TOPVWINS")", &e_info_client.hwc, &e_info_client.hwc_windows, &array);
EINA_SAFETY_ON_FALSE_GOTO(res, finish);
_e_win_info_make_array(array);
res = eldbus_message_error_get(msg, &name, &text);
EINA_SAFETY_ON_TRUE_GOTO(res, finish);
- res = eldbus_message_arguments_get(msg, "a("VALUE_TYPE_FOR_TOPVWINS")", &array);
+ res = eldbus_message_arguments_get(msg, "iia("VALUE_TYPE_FOR_TOPVWINS")", &e_info_client.hwc, &e_info_client.hwc_windows, &array);
EINA_SAFETY_ON_FALSE_GOTO(res, finish);
_e_win_info_make_array(array);
printf("\n\n%d Top level windows in EC list\n", eina_list_count(e_info_client.win_list));
printf("--------------------------------------------[ topvwins ]------------------------------------------------------------------------------\n");
- printf(" No Win_ID RcsID PID T w h x y Foc InReg Dep Opaq Vsbt Icon Vis Map Frame PL@ZPos Parent Title\n");
+ if (e_info_client.hwc_windows)
+ printf(" No Win_ID RcsID PID T w h x y Foc InReg Dep Opaq Vsbt Icon Vis Map Frame HWC_ST Parent Title\n");
+ else
+ printf(" No Win_ID RcsID PID T w h x y Foc InReg Dep Opaq Vsbt Icon Vis Map Frame PL@ZPos Parent Title\n");
printf("--------------------------------------------------------------------------------------------------------------------------------------\n");
if (!e_info_client.win_list)
prev_layer_name = win->layer_name;
}
- if (win->hwc >= 0)
+ if (e_info_client.hwc)
{
- if ((!win->iconic) && (win->frame_visible))
+ if (win->hwc_policy == E_HWC_POLICY_WINDOWS) // hwc windows
{
- if (win->pl_zpos == -999)
- snprintf(tmp, sizeof(tmp), " - ");
- else
+ switch(win->pl_zpos)
{
- if (win->hwc) snprintf(tmp, sizeof(tmp), "hwc@%i", win->pl_zpos);
- else snprintf(tmp, sizeof(tmp), "comp@%i", win->pl_zpos);
+ case E_HWC_WINDOW_STATE_NONE: snprintf(tmp, sizeof(tmp), " NO "); break;
+ case E_HWC_WINDOW_STATE_CLIENT: snprintf(tmp, sizeof(tmp), " CL "); break;
+ case E_HWC_WINDOW_STATE_DEVICE: snprintf(tmp, sizeof(tmp), " DV "); break;
+ case E_HWC_WINDOW_STATE_VIDEO: snprintf(tmp, sizeof(tmp), " VD "); break;
+ case E_HWC_WINDOW_STATE_CURSOR: snprintf(tmp, sizeof(tmp), " CS "); break;
+ default: snprintf(tmp, sizeof(tmp), " - "); break;
+ }
+ }
+ else // hwc planes
+ {
+ if (win->hwc >= 0)
+ {
+ if ((!win->iconic) && (win->frame_visible))
+ {
+ if (win->pl_zpos == -999)
+ snprintf(tmp, sizeof(tmp), " - ");
+ else
+ {
+ if (win->hwc) snprintf(tmp, sizeof(tmp), "hwc@%i", win->pl_zpos);
+ else snprintf(tmp, sizeof(tmp), "comp@%i", win->pl_zpos);
+ }
+ }
+ else
+ snprintf(tmp, sizeof(tmp), " - ");
+ }
+ else // hwc is not initialized or hwc_deactive 1
+ {
+ hwc_off = 1;
+ snprintf(tmp, sizeof(tmp), " - ");
}
}
- else
- snprintf(tmp, sizeof(tmp), " - ");
}
- else // hwc is not initialized or hwc_deactive 1
+ else
{
hwc_off = 1;
snprintf(tmp, sizeof(tmp), " - ");
printf("\n%d Top level windows in evas object list\n", eina_list_count(e_info_client.win_list));
printf("--------------------------------------[ topvwins ]----------------------------------------------------------------------------------\n");
- printf(" No Win_ID RcsID PID w h x y Foc InReg Dep Opaq Vsbt Icon Vis Map Frame PL@ZPos Parent Title\n");
+ if (e_info_client.hwc_windows)
+ printf(" No Win_ID RcsID PID w h x y Foc InReg Dep Opaq Vsbt Icon Vis Map Frame HWC_ST Parent Title\n");
+ else
+ printf(" No Win_ID RcsID PID w h x y Foc InReg Dep Opaq Vsbt Icon Vis Map Frame PL@ZPos Parent Title\n");
printf("------------------------------------------------------------------------------------------------------------------------------------\n");
if (!e_info_client.win_list)
prev_layer_name = win->layer_name;
}
- if (win->hwc >= 0)
+ if (e_info_client.hwc_windows)
{
- if ((!win->iconic) && (win->frame_visible))
+ if (win->hwc_policy == E_HWC_POLICY_WINDOWS) // hwc windows
{
- if (win->pl_zpos == -999)
- snprintf(tmp, sizeof(tmp), " - ");
- else
+ switch(win->pl_zpos)
{
- if (win->hwc) snprintf(tmp, sizeof(tmp), "hwc@%i", win->pl_zpos);
- else snprintf(tmp, sizeof(tmp), "comp@%i", win->pl_zpos);
+ case E_HWC_WINDOW_STATE_NONE: snprintf(tmp, sizeof(tmp), " NO "); break;
+ case E_HWC_WINDOW_STATE_CLIENT: snprintf(tmp, sizeof(tmp), " CL "); break;
+ case E_HWC_WINDOW_STATE_DEVICE: snprintf(tmp, sizeof(tmp), " DV "); break;
+ case E_HWC_WINDOW_STATE_VIDEO: snprintf(tmp, sizeof(tmp), " VD "); break;
+ case E_HWC_WINDOW_STATE_CURSOR: snprintf(tmp, sizeof(tmp), " CS "); break;
+ default: snprintf(tmp, sizeof(tmp), " - "); break;
}
}
- else
- snprintf(tmp, sizeof(tmp), " - ");
+ else // hwc planes
+ {
+ if ((!win->iconic) && (win->frame_visible))
+ {
+ if (win->pl_zpos == -999)
+ snprintf(tmp, sizeof(tmp), " - ");
+ else
+ {
+ if (win->hwc) snprintf(tmp, sizeof(tmp), "hwc@%i", win->pl_zpos);
+ else snprintf(tmp, sizeof(tmp), "comp@%i", win->pl_zpos);
+ }
+ }
+ else
+ snprintf(tmp, sizeof(tmp), " - ");
+ }
}
- else // hwc is not initialized or hwc_deactive 1
+ else
{
hwc_off = 1;
snprintf(tmp, sizeof(tmp), " - ");
printf("%d Top level windows\n", eina_list_count(e_info_client.win_list));
printf("--------------------------------------[ topvwins ]----------------------------------------------------------------------------------\n");
- printf(" No Win_ID RcsID PID w h x y Foc InReg Dep Opaq Vsbt Icon Vis Map Frame PL@ZPos Parent Title\n");
+ if (e_info_client.hwc_windows)
+ printf(" No Win_ID RcsID PID w h x y Foc InReg Dep Opaq Vsbt Icon Vis Map Frame HWC_ST Parent Title\n");
+ else
+ printf(" No Win_ID RcsID PID w h x y Foc InReg Dep Opaq Vsbt Icon Vis Map Frame PL@ZPos Parent Title\n");
printf("------------------------------------------------------------------------------------------------------------------------------------\n");
if (!e_info_client.win_list)
prev_layer_name = win->layer_name;
}
- if (win->hwc >= 0)
+ if (e_info_client.hwc)
{
- if ((!win->iconic) && (win->frame_visible))
+ if (win->hwc_policy == E_HWC_POLICY_WINDOWS) // hwc windows
{
- if (win->pl_zpos == -999)
- snprintf(tmp, sizeof(tmp), " - ");
- else
+ switch(win->pl_zpos)
{
- if (win->hwc) snprintf(tmp, sizeof(tmp), "hwc@%i", win->pl_zpos);
- else snprintf(tmp, sizeof(tmp), "comp@%i", win->pl_zpos);
+ case E_HWC_WINDOW_STATE_NONE: snprintf(tmp, sizeof(tmp), " NO "); break;
+ case E_HWC_WINDOW_STATE_CLIENT: snprintf(tmp, sizeof(tmp), " CL "); break;
+ case E_HWC_WINDOW_STATE_DEVICE: snprintf(tmp, sizeof(tmp), " DV "); break;
+ case E_HWC_WINDOW_STATE_VIDEO: snprintf(tmp, sizeof(tmp), " VD "); break;
+ case E_HWC_WINDOW_STATE_CURSOR: snprintf(tmp, sizeof(tmp), " CS "); break;
+ default: snprintf(tmp, sizeof(tmp), " - "); break;
+ }
+ }
+ else // hwc planes
+ {
+ if (win->hwc >= 0)
+ {
+ if ((!win->iconic) && (win->frame_visible))
+ {
+ if (win->pl_zpos == -999)
+ snprintf(tmp, sizeof(tmp), " - ");
+ else
+ {
+ if (win->hwc) snprintf(tmp, sizeof(tmp), "hwc@%i", win->pl_zpos);
+ else snprintf(tmp, sizeof(tmp), "comp@%i", win->pl_zpos);
+ }
+ }
+ else
+ snprintf(tmp, sizeof(tmp), " - ");
+ }
+ else // hwc is not initialized or hwc_deactive 1
+ {
+ hwc_off = 1;
+ snprintf(tmp, sizeof(tmp), " - ");
}
}
- else
- snprintf(tmp, sizeof(tmp), " - ");
}
- else // hwc is not initialized or hwc_deactive 1
+ else
{
hwc_off = 1;
snprintf(tmp, sizeof(tmp), " - ");
res_id, pid, x, y, w, h, border_size, alpha ? 32 : 24,
focused, opaque, obscured, iconic, visible ? "Visible" : "Not visible",
frame_visible, redirected ? "yes" : "no", layer_name);
- printf(" PL@ZPos:");
- if (hwc >= 0)
+ if (e_info_client.hwc_windows)
+ printf(" HWC_ST:");
+ else
+ printf(" PL@ZPos:");
+ if (e_info_client.hwc)
{
- if ((!iconic) && (frame_visible))
+ if (e_info_client.hwc_windows) // hwc windows
{
- if (pl_zpos == -999)
- printf(" - ");
+ switch(pl_zpos)
+ {
+ case E_HWC_WINDOW_STATE_NONE: printf(" NO "); break;
+ case E_HWC_WINDOW_STATE_CLIENT: printf(" CL "); break;
+ case E_HWC_WINDOW_STATE_DEVICE: printf(" DV "); break;
+ case E_HWC_WINDOW_STATE_VIDEO: printf(" VD "); break;
+ case E_HWC_WINDOW_STATE_CURSOR: printf(" CS "); break;
+ default: printf(" - "); break;
+ }
+ }
+ else // hwc planes
+ {
+ if (hwc >= 0)
+ {
+ if ((!iconic) && (frame_visible))
+ {
+ if (pl_zpos == -999)
+ printf(" - ");
+ else
+ {
+ if (hwc) printf(" hwc@%i\n", pl_zpos);
+ else printf(" comp@%i\n", pl_zpos);
+ }
+ }
+ else
+ printf(" - \n");
+ }
else
{
- if (hwc) printf(" hwc@%i\n", pl_zpos);
- else printf(" comp@%i\n", pl_zpos);
+ printf(" - \n");
}
}
- else
- printf(" - \n");
}
else
{
printf(" - \n");
}
+
printf (" Corners: +%d+%d -%d+%d -%d-%d +%d-%d\n",
x, y, xright, y, xright, ybelow, x, ybelow);
str_r -= str_l; \
} while(0)
-#define VALUE_TYPE_FOR_TOPVWINS "uuisiiiiibbbiiibbiiusbb"
+#define VALUE_TYPE_FOR_TOPVWINS "uuisiiiiibbbiiibbiiiusbb"
#define VALUE_TYPE_REQUEST_RESLIST "ui"
#define VALUE_TYPE_REPLY_RESLIST "ssi"
#define VALUE_TYPE_FOR_INPUTDEV "ssi"
}
static void
-_e_info_server_ec_hwc_info_get(E_Client *ec, int *hwc, int *pl_zpos)
+_e_info_server_ec_hwc_info_get(E_Client *ec, int *hwc, int *hwc_policy, int *pl_zpos)
{
Eina_List *l;
E_Output *eout;
eout = e_output_find(ec->zone->output_id);
if (!eout) return;
- if (e_hwc_policy_get(eout->hwc) == E_HWC_POLICY_PLANES)
+ *hwc_policy = e_hwc_policy_get(eout->hwc);
+
+ if (*hwc_policy == E_HWC_POLICY_PLANES)
{
EINA_LIST_FOREACH(eout->planes, l, ep)
{
if (e_hwc_window_is_on_hw_overlay(hwc_window))
*hwc = 1;
- *pl_zpos = e_hwc_window_zpos_get(hwc_window);
+ *pl_zpos = e_hwc_window_accepted_state_get(hwc_window);
}
}
uint32_t res_id = 0;
pid_t pid = -1;
char layer_name[32];
- int hwc = -1, pl_zpos = -999;
+ int hwc = -1, hwc_policy = E_HWC_POLICY_NONE, pl_zpos = -999;
int iconified = 0;
Eina_Bool has_input_region = EINA_FALSE;
Eina_List *list_input_region = NULL;
if (ec->comp_data)
mapped = ec->comp_data->mapped;
- _e_info_server_ec_hwc_info_get(ec, &hwc, &pl_zpos);
+ _e_info_server_ec_hwc_info_get(ec, &hwc, &hwc_policy, &pl_zpos);
e_comp_object_input_rect_get(ec->frame, &list_input_region);
if (list_input_region)
e_client_util_name_get(ec) ?: "NO NAME",
x, y, w, h, ec->layer,
ec->visible, mapped, ec->argb, ec->visibility.opaque, ec->visibility.obscured, iconified,
- evas_object_visible_get(ec->frame), ec->focused, hwc, pl_zpos, pwin, layer_name, has_input_region, transformed);
+ evas_object_visible_get(ec->frame), ec->focused, hwc, hwc_policy, pl_zpos, pwin, layer_name, has_input_region, transformed);
eldbus_message_iter_container_close(array_of_ec, struct_of_ec);
}
uint32_t res_id = 0;
pid_t pid = -1;
char layer_name[32];
- int hwc = -1, pl_zpos = -999;
+ int hwc = -1, hwc_policy = E_HWC_POLICY_NONE, pl_zpos = -999;
int iconified = 0;
Eina_Bool has_input_region = EINA_FALSE;
Eina_List *list_input_region = NULL;
if (ec->comp_data)
mapped = ec->comp_data->mapped;
- _e_info_server_ec_hwc_info_get(ec, &hwc, &pl_zpos);
+ _e_info_server_ec_hwc_info_get(ec, &hwc, &hwc_policy, &pl_zpos);
e_comp_object_input_rect_get(o, &list_input_region);
if (list_input_region)
e_client_util_name_get(ec) ?: "NO NAME",
ec->x, ec->y, ec->w, ec->h, ec->layer,
ec->visible, mapped, ec->argb, ec->visibility.opaque, ec->visibility.obscured, iconified,
- evas_object_visible_get(ec->frame), ec->focused, hwc, pl_zpos, pwin, layer_name, has_input_region, transformed);
+ evas_object_visible_get(ec->frame), ec->focused, hwc, hwc_policy, pl_zpos, pwin, layer_name, has_input_region, transformed);
eldbus_message_iter_container_close(array_of_ec, struct_of_ec);
}
Eldbus_Message *reply = eldbus_message_method_return_new(msg);
Eldbus_Message_Iter *iter = eldbus_message_iter_get(reply);
+ eldbus_message_iter_basic_append(iter, 'i', e_comp->hwc);
+ eldbus_message_iter_basic_append(iter, 'i', _e_info_server_is_hwc_windows());
+
_msg_ecs_append(iter, EINA_TRUE);
return reply;
_e_info_server_cb_all_window_info_get(const Eldbus_Service_Interface *iface EINA_UNUSED, const Eldbus_Message *msg)
{
Eldbus_Message *reply = eldbus_message_method_return_new(msg);
+ Eldbus_Message_Iter *iter = eldbus_message_iter_get(reply);
+
+ eldbus_message_iter_basic_append(iter, 'i', e_comp->hwc);
+ eldbus_message_iter_basic_append(iter, 'i', _e_info_server_is_hwc_windows());
- _msg_clients_append(eldbus_message_iter_get(reply), EINA_FALSE);
+ _msg_clients_append(iter, EINA_FALSE);
return reply;
}
{
uint64_t win;
int num_child = -1;
- int hwc = -1, pl_zpos = -999;
+ int hwc = -1, hwc_policy = E_HWC_POLICY_NONE, pl_zpos = -999;
if (recurse)
num_child = eina_list_count(child->transients);
if ((!child->iconic) && (!child->visibility.obscured) &&
evas_object_visible_get(ec->frame))
- _e_info_server_ec_hwc_info_get(child, &hwc, &pl_zpos);
+ _e_info_server_ec_hwc_info_get(child, &hwc, &hwc_policy, &pl_zpos);
win = e_client_util_win_get(child);
eldbus_message_iter_arguments_append(iter, "(tsiiiiiiii)", &struct_of_child);
uint32_t res_id = 0;
pid_t pid = -1;
char layer_name[64];
- int hwc = -1, pl_zpos = -999, dw, dh, xright, ybelow;;
+ int hwc = -1, hwc_policy = E_HWC_POLICY_NONE, pl_zpos = -999;
+ int dw, dh, xright, ybelow;;
res = eldbus_message_arguments_get(msg, VALUE_TYPE_REQUEST_FOR_WININFO,
&win);
}
}
- _e_info_server_ec_hwc_info_get(ec, &hwc, &pl_zpos);
+ _e_info_server_ec_hwc_info_get(ec, &hwc, &hwc_policy, &pl_zpos);
ecore_evas_screen_geometry_get(e_comp->ee, NULL, NULL, &dw, &dh);
//{ "method_name", arguments_from_client, return_values_to_client, _method_cb, ELDBUS_METHOD_FLAG },
static const Eldbus_Method methods[] = {
{ "get_window_info", NULL, ELDBUS_ARGS({"iiiiisiiiiia("VALUE_TYPE_FOR_TOPVWINS")", "array of ec"}), _e_info_server_cb_window_info_get, 0 },
- { "get_ec_info", NULL, ELDBUS_ARGS({"a("VALUE_TYPE_FOR_TOPVWINS")", "array of ec"}),_e_info_server_cb_ec_info_get, 0 },
- { "get_all_window_info", NULL, ELDBUS_ARGS({"a("VALUE_TYPE_FOR_TOPVWINS")", "array of ec"}), _e_info_server_cb_all_window_info_get, 0 },
+ { "get_ec_info", NULL, ELDBUS_ARGS({"iia("VALUE_TYPE_FOR_TOPVWINS")", "array of ec"}),_e_info_server_cb_ec_info_get, 0 },
+ { "get_all_window_info", NULL, ELDBUS_ARGS({"iia("VALUE_TYPE_FOR_TOPVWINS")", "array of ec"}), _e_info_server_cb_all_window_info_get, 0 },
{ "compobjs", NULL, ELDBUS_ARGS({"a("SIGNATURE_COMPOBJS_CLIENT")", "array of comp objs"}), _e_info_server_cb_compobjs, 0 },
{ "subsurface", NULL, ELDBUS_ARGS({"a("SIGNATURE_SUBSURFACE")", "array of ec"}), _e_info_server_cb_subsurface, 0 },
{ "dump_wins", ELDBUS_ARGS({SIGNATURE_DUMP_WINS, "directory"}), ELDBUS_ARGS({"s", "result of dump"}), _e_info_server_cb_wins_dump, 0 },