X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fsession.c;h=f6314dd2d62462ae8637f586f7432ae2ace558e8;hb=4cd886e5188549ab48a11b70cb40b65efe916b6c;hp=58b07ca5b4843486f7f26dde9a8ccd1bd319b331;hpb=9c1438f17b84ef096faec0b8d52dd7d39c2c50c5;p=chaz%2Fopenbox diff --git a/openbox/session.c b/openbox/session.c index 58b07ca5..f6314dd2 100644 --- a/openbox/session.c +++ b/openbox/session.c @@ -2,9 +2,14 @@ #ifndef USE_SM +#include "session.h" +#include "client.h" + void session_load(char *path) {} void session_startup(int argc, char **argv) {} void session_shutdown() {} +ObSessionState* session_state_find(ObClient *c) { return NULL; } +void session_state_free(ObSessionState *state) {} #else @@ -289,7 +294,7 @@ static gboolean session_save() if (!client_normal(c)) continue; - if (!PROP_GETS(c->window, sm_client_id, locale, &client_id)) + if (!(client_id = client_get_sm_client_id(c))) continue; prex = c->area.x; @@ -374,11 +379,11 @@ void session_state_free(ObSessionState *state) } } -static gboolean session_state_cmp(const ObSessionState *s, const ObClient *c) +static gboolean session_state_cmp(ObSessionState *s, ObClient *c) { gchar *client_id; - if (!PROP_GETS(c->window, sm_client_id, locale, &client_id)) + if (!(client_id = client_get_sm_client_id(c))) return FALSE; g_print("\nsaved %s\nnow %s\n", s->id, client_id); if (strcmp(s->id, client_id)) { @@ -386,13 +391,13 @@ static gboolean session_state_cmp(const ObSessionState *s, const ObClient *c) return FALSE; } g_free(client_id); - g_print("\nsaved %s\nnow %s\n", s->name, c->name); + g_print("saved %s\nnow %s\n", s->name, c->name); if (strcmp(s->name, c->name)) return FALSE; - g_print("\nsaved %s\nnow %s\n", s->class, c->class); + g_print("saved %s\nnow %s\n", s->class, c->class); if (strcmp(s->class, c->class)) return FALSE; - g_print("\nsaved %s\nnow %s\n", s->role, c->role); + g_print("saved %s\nnow %s\n\n", s->role, c->role); if (strcmp(s->role, c->role)) return FALSE; return TRUE; @@ -476,10 +481,7 @@ void session_load(char *path) state->max_vert = parse_find_node("max_vert", node->xmlChildrenNode) != NULL; - g_message("read session window %s", state->name); - /* save this */ - g_message("saved state for %s %s", state->name, state->id); sm_saved_state = g_slist_prepend(sm_saved_state, state); goto session_load_ok;