ui: ensure we clean up properly before exit.
Ensure timer callback gets cancelled before exitting the mainloop.
This commit is contained in:
parent
a9a2b7c671
commit
8076a4b96a
5
src/ui.c
5
src/ui.c
|
@ -20,6 +20,8 @@ ui_shutdown(Ui *ui)
|
||||||
{
|
{
|
||||||
evas_object_hide(ui->win);
|
evas_object_hide(ui->win);
|
||||||
|
|
||||||
|
ui->shutting_down = EINA_TRUE;
|
||||||
|
|
||||||
if (ui->thread_system)
|
if (ui->thread_system)
|
||||||
ecore_thread_cancel(ui->thread_system);
|
ecore_thread_cancel(ui->thread_system);
|
||||||
|
|
||||||
|
@ -1109,6 +1111,9 @@ _process_panel_update(void *data)
|
||||||
|
|
||||||
ui = data;
|
ui = data;
|
||||||
|
|
||||||
|
if (ui->shutting_down)
|
||||||
|
return ECORE_CALLBACK_CANCEL;
|
||||||
|
|
||||||
proc = proc_info_by_pid(ui->selected_pid);
|
proc = proc_info_by_pid(ui->selected_pid);
|
||||||
if (!proc)
|
if (!proc)
|
||||||
{
|
{
|
||||||
|
|
2
src/ui.h
2
src/ui.h
|
@ -109,7 +109,6 @@ typedef struct Ui
|
||||||
pid_t program_pid;
|
pid_t program_pid;
|
||||||
|
|
||||||
Data_Unit data_unit;
|
Data_Unit data_unit;
|
||||||
const char *data_unit_symbol;
|
|
||||||
|
|
||||||
#define TEXT_FIELD_MAX 65535
|
#define TEXT_FIELD_MAX 65535
|
||||||
char *fields[PROCESS_INFO_FIELDS];
|
char *fields[PROCESS_INFO_FIELDS];
|
||||||
|
@ -127,6 +126,7 @@ typedef struct Ui
|
||||||
Sort_Type sort_type;
|
Sort_Type sort_type;
|
||||||
Eina_Bool sort_reverse;
|
Eina_Bool sort_reverse;
|
||||||
Eina_Bool panel_visible;
|
Eina_Bool panel_visible;
|
||||||
|
Eina_Bool shutting_down;
|
||||||
} Ui;
|
} Ui;
|
||||||
|
|
||||||
Ui *
|
Ui *
|
||||||
|
|
Loading…
Reference in New Issue