X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=plugins%2Fplacement%2Fhistory.c;h=a7460b3d106c2fd60b805be8b513e48e10413b52;hb=07b66ee1e31f6f5ac65c1437719fb3865a7e7417;hp=22dbb6e0e30649d1f32b506fec6e216015baee56;hpb=2477a38d2f3063b697e44bf3690cf280fb26ca8a;p=chaz%2Fopenbox diff --git a/plugins/placement/history.c b/plugins/placement/history.c index 22dbb6e0..a7460b3d 100644 --- a/plugins/placement/history.c +++ b/plugins/placement/history.c @@ -1,3 +1,4 @@ +#include "kernel/debug.h" #include "kernel/openbox.h" #include "kernel/dispatch.h" #include "kernel/frame.h" @@ -58,7 +59,7 @@ gboolean place_history(ObClient *c) if (hi && !(hi->flags & PLACED)) { hi->flags |= PLACED; - if (ob_state != OB_STATE_STARTING) { + if (ob_state() != OB_STATE_STARTING) { if (hi->flags & HAVE_POSITION || hi->flags & HAVE_SIZE) { if (hi->flags & HAVE_POSITION) { @@ -145,7 +146,7 @@ static void save_history() for (it = history_list; it; it = g_slist_next(it)) { struct HistoryItem *hi = it->data; - g_message("adding %s", hi->name); + ob_debug("adding %s\n", hi->name); node = xmlNewChild(root, NULL, (const xmlChar*) "entry", NULL); xmlNewProp(node, (const xmlChar*) "name", (const xmlChar*) hi->name); xmlNewProp(node, (const xmlChar*) "class", (const xmlChar*) hi->class); @@ -181,7 +182,7 @@ static void save_history() xmlIndentTreeOutput = 1; xmlSaveFormatFile(history_path, doc, 1); - xmlFree(doc); + xmlFreeDoc(doc); } static void load_history() @@ -236,7 +237,7 @@ static void load_history() g_free(name); g_free(class); g_free(role); node = parse_find_node("entry", node->next); } - xmlFree(doc); + xmlFreeDoc(doc); } void history_startup()