forked from enlightenment/enlightenment
procstats: Handle e_client fullscreen requests.
Add an event handler for E_CLIENT_FULLSCREEN. Remove the client, destroying the popup and icon region. This resolves the issue where a client fullscreen request would leave a rogue icon region and popup if switching to full screen with some applications. @fix T8996
This commit is contained in:
parent
e4768d53f0
commit
b413ee5d03
|
@ -8,6 +8,8 @@
|
||||||
|
|
||||||
#define POLL_INTERVAL 2.0
|
#define POLL_INTERVAL 2.0
|
||||||
|
|
||||||
|
static Ecore_Event_Handler *_proc_stats_handler_fullscreen = NULL;
|
||||||
|
|
||||||
static int64_t _mem_total;
|
static int64_t _mem_total;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
|
@ -77,6 +79,28 @@ _memory_total(void)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static Eina_Bool
|
||||||
|
_proc_stats_handler_fullscreen_check_cb(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
|
||||||
|
{
|
||||||
|
Proc_Stats_Client *client;
|
||||||
|
E_Event_Client *ev;
|
||||||
|
Eina_List *l;
|
||||||
|
Proc_Stats_Module *module = _this_module;
|
||||||
|
|
||||||
|
ev = event;
|
||||||
|
|
||||||
|
EINA_LIST_FOREACH(module->clients, l, client)
|
||||||
|
{
|
||||||
|
if (client->ec == ev->ec)
|
||||||
|
{
|
||||||
|
_proc_stats_client_remove(client);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return ECORE_CALLBACK_PASS_ON;
|
||||||
|
}
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_proc_stats_client_exists(E_Client *ec)
|
_proc_stats_client_exists(E_Client *ec)
|
||||||
{
|
{
|
||||||
|
@ -505,6 +529,8 @@ e_modapi_init(E_Module *m)
|
||||||
//module->sleeper = e_powersave_sleeper_new();
|
//module->sleeper = e_powersave_sleeper_new();
|
||||||
module->poll_interval = POLL_INTERVAL;
|
module->poll_interval = POLL_INTERVAL;
|
||||||
|
|
||||||
|
_proc_stats_handler_fullscreen = ecore_event_handler_add
|
||||||
|
(E_EVENT_CLIENT_FULLSCREEN, _proc_stats_handler_fullscreen_check_cb, NULL);
|
||||||
_proc_stats_thread_feedback_cb(module, NULL, proc_info_all_children_get());
|
_proc_stats_thread_feedback_cb(module, NULL, proc_info_all_children_get());
|
||||||
|
|
||||||
module->thread = ecore_thread_feedback_run(_proc_stats_thread,
|
module->thread = ecore_thread_feedback_run(_proc_stats_thread,
|
||||||
|
@ -524,6 +550,9 @@ e_modapi_shutdown(E_Module *m EINA_UNUSED)
|
||||||
|
|
||||||
//e_powersave_sleeper_free(module->sleeper);
|
//e_powersave_sleeper_free(module->sleeper);
|
||||||
|
|
||||||
|
ecore_event_handler_del(_proc_stats_handler_fullscreen);
|
||||||
|
_proc_stats_handler_fullscreen = NULL;
|
||||||
|
|
||||||
EINA_LIST_FREE(module->clients, client)
|
EINA_LIST_FREE(module->clients, client)
|
||||||
_proc_stats_client_del(client);
|
_proc_stats_client_del(client);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue