ui: ensure we clean up properly before exit.

Ensure timer callback gets cancelled before exitting
the mainloop.
edi-0.5
Alastair Poole 5 years ago
parent a9a2b7c671
commit 8076a4b96a
  1. 5
      src/ui.c
  2. 2
      src/ui.h

@ -20,6 +20,8 @@ ui_shutdown(Ui *ui)
{
evas_object_hide(ui->win);
ui->shutting_down = EINA_TRUE;
if (ui->thread_system)
ecore_thread_cancel(ui->thread_system);
@ -1109,6 +1111,9 @@ _process_panel_update(void *data)
ui = data;
if (ui->shutting_down)
return ECORE_CALLBACK_CANCEL;
proc = proc_info_by_pid(ui->selected_pid);
if (!proc)
{

@ -109,7 +109,6 @@ typedef struct Ui
pid_t program_pid;
Data_Unit data_unit;
const char *data_unit_symbol;
#define TEXT_FIELD_MAX 65535
char *fields[PROCESS_INFO_FIELDS];
@ -127,6 +126,7 @@ typedef struct Ui
Sort_Type sort_type;
Eina_Bool sort_reverse;
Eina_Bool panel_visible;
Eina_Bool shutting_down;
} Ui;
Ui *

Loading…
Cancel
Save