diff --git a/awesome.c b/awesome.c index 8b417e203..219431af4 100644 --- a/awesome.c +++ b/awesome.c @@ -357,10 +357,10 @@ main(int argc, char **argv) setlocale(LC_CTYPE, ""); /* Get XDG basedir data */ - xdg = xdgAllocHandle(); + xdgInitHandle(&xdg); /* init lua */ - luaA_init(xdg); + luaA_init(&xdg); /* check args */ while((opt = getopt_long(argc, argv, "vhkc:", @@ -374,7 +374,7 @@ main(int argc, char **argv) exit_help(EXIT_SUCCESS); break; case 'k': - if(!luaA_parserc(xdg, confpath, false)) + if(!luaA_parserc(&xdg, confpath, false)) { fprintf(stderr, "✘ Configuration file syntax error.\n"); return EXIT_FAILURE; @@ -505,9 +505,9 @@ main(int argc, char **argv) spawn_init(); /* Parse and run configuration file */ - luaA_parserc(xdg, confpath, true); + luaA_parserc(&xdg, confpath, true); - xdgFreeHandle(xdg); + xdgWipeHandle(&xdg); /* scan existing windows */ scan(); diff --git a/awesomeConfig.cmake b/awesomeConfig.cmake index 6c46fb2f6..610025eec 100644 --- a/awesomeConfig.cmake +++ b/awesomeConfig.cmake @@ -148,7 +148,7 @@ pkg_check_modules(AWESOME_REQUIRED REQUIRED libstartup-notification-1.0>=0.10 xproto>=7.0.11 imlib2 - libxdg-basedir) + libxdg-basedir>=1.0.0) if(NOT AWESOME_REQUIRED_FOUND OR NOT AWESOME_COMMON_REQUIRED_FOUND) message(FATAL_ERROR) diff --git a/luaa.c b/luaa.c index 1268a49e0..0a43e5bff 100644 --- a/luaa.c +++ b/luaa.c @@ -640,7 +640,7 @@ luaA_awesome_newindex(lua_State *L) * \param xdg An xdg handle to use to get XDG basedir. */ void -luaA_init(xdgHandle xdg) +luaA_init(xdgHandle* xdg) { lua_State *L; static const struct luaL_reg awesome_lib[] = @@ -780,7 +780,7 @@ luaA_loadrc(const char *confpath, bool run) * \param run Run the configuration file. */ bool -luaA_parserc(xdgHandle xdg, const char *confpatharg, bool run) +luaA_parserc(xdgHandle* xdg, const char *confpatharg, bool run) { char *confpath = NULL; bool ret = false; diff --git a/luaa.h b/luaa.h index f5fc898cc..cfb6b815f 100644 --- a/luaa.h +++ b/luaa.h @@ -328,8 +328,8 @@ luaA_pushpadding(lua_State *L, padding_t *padding) return 1; } -void luaA_init(xdgHandle); -bool luaA_parserc(xdgHandle, const char *, bool); +void luaA_init(xdgHandle *); +bool luaA_parserc(xdgHandle *, const char *, bool); void luaA_on_timer(EV_P_ ev_timer *, int); int luaA_pushxcolor(lua_State *, const xcolor_t *); int luaA_pushcolor(lua_State *, const color_t *);