From dc1e211fea89534886d98ac3b6db299cfb4420b5 Mon Sep 17 00:00:00 2001 From: Juyeon Lee Date: Wed, 23 Mar 2016 14:50:08 +0900 Subject: [PATCH] enlightenment_info: added nocomp info at topvwins Change-Id: If6166c091a8e3e022ae8e66d2039f9202fb23cdd --- src/bin/e_info_client.c | 16 ++++++++++++---- src/bin/e_info_server.c | 16 ++++++++++++++-- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/src/bin/e_info_client.c b/src/bin/e_info_client.c index c6c7d9ee65..97f0f23723 100644 --- a/src/bin/e_info_client.c +++ b/src/bin/e_info_client.c @@ -33,10 +33,11 @@ typedef struct _E_Win_Info int visibility; int iconic; int focused; + int hwc; const char *layer_name; // layer name } E_Win_Info; -#define VALUE_TYPE_FOR_TOPVWINS "uuisiiiiibbiibbs" +#define VALUE_TYPE_FOR_TOPVWINS "uuisiiiiibbiibbis" #define VALUE_TYPE_REQUEST_RESLIST "ui" #define VALUE_TYPE_REPLY_RESLIST "ssi" #define VALUE_TYPE_FOR_INPUTDEV "ssi" @@ -49,7 +50,7 @@ static Eina_Bool _e_info_client_eldbus_message(const char *method, E_Info_Messag static Eina_Bool _e_info_client_eldbus_message_with_args(const char *method, E_Info_Message_Cb cb, const char *signature, ...); 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 visibility, int iconic, int focused, const char *layer_name) +_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 visibility, int iconic, int focused, int hwc, const char *layer_name) { E_Win_Info *win = NULL; @@ -71,6 +72,7 @@ _e_win_info_new(Ecore_Window id, uint32_t res_id, int pid, Eina_Bool alpha, int win->visibility = visibility; win->iconic = iconic; win->focused = focused; + win->hwc = hwc; win->layer_name = eina_stringshare_add(layer_name); return win; @@ -107,7 +109,7 @@ _cb_window_info_get(const Eldbus_Message *msg) { const char *win_name; const char *layer_name; - int x, y, w, h, layer, visibility, opaque; + int x, y, w, h, layer, visibility, opaque, hwc; Eina_Bool visible, alpha, iconic, focused; Ecore_Window id; uint32_t res_id; @@ -130,6 +132,7 @@ _cb_window_info_get(const Eldbus_Message *msg) &visibility, &iconic, &focused, + &hwc, &layer_name); if (!res) { @@ -137,7 +140,7 @@ _cb_window_info_get(const Eldbus_Message *msg) continue; } - win = _e_win_info_new(id, res_id, pid, alpha, opaque, win_name, x, y, w, h, layer, visible, visibility, iconic, focused, layer_name); + win = _e_win_info_new(id, res_id, pid, alpha, opaque, win_name, x, y, w, h, layer, visible, visibility, iconic, focused, hwc, layer_name); e_info_client.win_list = eina_list_append(e_info_client.win_list, win); } @@ -201,6 +204,7 @@ _e_info_client_proc_topvwins_info(int argc, char **argv) int i = 0; int prev_layer = -1; const char *prev_layer_name = NULL; + E_Win_Info *nocomp_win = NULL; if (!_e_info_client_eldbus_message("get_window_info", _cb_window_info_get)) return; @@ -230,12 +234,16 @@ _e_info_client_proc_topvwins_info(int argc, char **argv) } printf("%3d 0x%08x %5d %5d %5d %5d %6d %6d %c %5d %d ", i, win->id, win->res_id, win->pid, win->w, win->h, win->x, win->y, win->focused ? 'O':' ', win->alpha? 32:24, win->opaque); printf("%2d %d %-11s %s\n", win->visibility, win->iconic, win->vis? "Viewable":"NotViewable", win->name?:"No Name"); + if(win->hwc == 2) nocomp_win = win; } if (prev_layer_name) printf("------------------------------------------------------------------------------------------------------------[%s]\n", prev_layer_name ? prev_layer_name : " "); + if(nocomp_win) + printf("\nNocomp : %s(0x%08x)\n\n", nocomp_win->name?:"No Name", nocomp_win->id); + E_FREE_LIST(e_info_client.win_list, _e_win_info_free); } diff --git a/src/bin/e_info_server.c b/src/bin/e_info_server.c index 5d8d464a26..9ded633f5a 100644 --- a/src/bin/e_info_server.c +++ b/src/bin/e_info_server.c @@ -22,7 +22,7 @@ typedef struct _E_Info_Server static E_Info_Server e_info_server; -#define VALUE_TYPE_FOR_TOPVWINS "uuisiiiiibbiibbs" +#define VALUE_TYPE_FOR_TOPVWINS "uuisiiiiibbiibbis" #define VALUE_TYPE_REQUEST_RESLIST "ui" #define VALUE_TYPE_REPLY_RESLIST "ssi" #define VALUE_TYPE_FOR_INPUTDEV "ssi" @@ -44,6 +44,7 @@ _msg_clients_append(Eldbus_Message_Iter *iter) uint32_t res_id = 0; pid_t pid = -1; char layer_name[32]; + int hwc = -1; ec = evas_object_data_get(o, "E_Client"); if (!ec) continue; @@ -62,6 +63,17 @@ _msg_clients_append(Eldbus_Message_Iter *iter) wl_client_get_credentials(wl_resource_get_client(cdata->surface), &pid, NULL, NULL); } #endif + if (e_comp->hwc) + { + // TODO: print plane number + if (!e_comp->nocomp_ec) + hwc = 1; // comp mode + else if (e_comp->nocomp_ec == ec) + hwc = 2; // a client occupied scanout buff + else + hwc = 0; + } + eldbus_message_iter_arguments_append(array_of_ec, "("VALUE_TYPE_FOR_TOPVWINS")", &struct_of_ec); eldbus_message_iter_arguments_append @@ -71,7 +83,7 @@ _msg_clients_append(Eldbus_Message_Iter *iter) pid, e_client_util_name_get(ec) ?: "NO NAME", ec->x, ec->y, ec->w, ec->h, ec->layer, - ec->visible, ec->argb, ec->visibility.opaque, ec->visibility.obscured, ec->iconic, ec->focused, layer_name); + ec->visible, ec->argb, ec->visibility.opaque, ec->visibility.obscured, ec->iconic, ec->focused, hwc, layer_name); eldbus_message_iter_container_close(array_of_ec, struct_of_ec); } -- 2.34.1