static void on_ipc_shutdown(gpointer i3_w) { i3WorkspacesPlugin *i3_workspaces = (i3WorkspacesPlugin *) i3_w; remove_workspaces(i3_workspaces); i3wm_destruct(i3_workspaces->i3wm); i3_workspaces->i3wm = NULL; recover_from_disconnect(i3_workspaces); connect_callbacks(i3_workspaces); add_workspaces(i3_workspaces); }
/** * destruct: * @plugin: the xfce plugin * @i3_workspaces: the i3 workspaces plugin * * Free all related resources. */ static void destruct(XfcePanelPlugin *plugin, i3WorkspacesPlugin *i3_workspaces) { /* save configuration */ i3_workspaces_config_save(i3_workspaces->config, plugin); i3_workspaces_config_free(i3_workspaces->config); /* destroy the panel widgets */ gtk_widget_destroy(i3_workspaces->hvbox); /* destroy the i3wm delegate */ i3wm_destruct(i3_workspaces->i3wm); /* free the plugin structure */ panel_slice_free(i3WorkspacesPlugin, i3_workspaces); }
static void on_ipc_shutdown(gpointer i3_w) { i3WorkspacesPlugin *i3_workspaces = (i3WorkspacesPlugin *) i3_w; remove_workspaces(i3_workspaces); i3wm_destruct(i3_workspaces->i3wm); i3_workspaces->i3wm = NULL; //FIXME fix this //TODO: error_state_on(); //recover_from_disconnect(i3_workspaces); //TODO: error_state_off(); //connect_callbacks(i3_workspaces); //add_workspaces(i3_workspaces); }