diff --git a/Makefile.am b/Makefile.am index 18869dc0c..d897e2af0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -97,7 +97,7 @@ AM_CPPFLAGS = $(pangocairo_CFLAGS) $(AWESOME_CFLAGS) \ $(xcb_CFLAGS) $(xcb_event_CFLAGS) \ $(xcb_randr_CFLAGS) $(xcb_xinerama_CFLAGS) $(xcb_shape_CFLAGS) \ $(xcb_aux_CFLAGS) $(xcb_atom_CFLAGS) $(xcb_keysyms_CFLAGS) \ - $(xcb_icccm_CFLAGS) $(dbus_CFLAGS) $(Lua_CFLAGS) + $(xcb_icccm_CFLAGS) $(dbus_CFLAGS) $(Lua_CFLAGS) $(gthread_CLFAGS) bin_PROGRAMS += awesome awesome_SOURCES = \ @@ -133,7 +133,7 @@ awesome_SOURCES += $(WIDGETS) awesome_LDADD = $(pangocairo_LIBS) $(xcb_LIBS) $(xcb_event_LIBS) \ $(xcb_randr_LIBS) $(xcb_xinerama_LIBS) $(xcb_shape_LIBS) $(xcb_aux_LIBS) \ $(xcb_atom_LIBS) $(xcb_keysyms_LIBS) $(xcb_icccm_LIBS) $(dbus_LIBS)\ - $(imlib2_LIBS) $(GTK_LIBS) $(Lua_LIBS) + $(imlib2_LIBS) $(GTK_LIBS) $(Lua_LIBS) $(gthread_LIBS) bin_PROGRAMS += awesome-client awesome_client_SOURCES = \ diff --git a/awesome.c b/awesome.c index 8f530bf1a..8c27e3e00 100644 --- a/awesome.c +++ b/awesome.c @@ -36,6 +36,8 @@ #include +#include + #include #include #include @@ -484,6 +486,9 @@ main(int argc, char **argv) statusbar_refresh(NULL); layout_refresh(NULL); + /* initialize Glib for thread safeness */ + g_thread_init(NULL); + /* main event loop, also reads status text from socket */ while(running) { diff --git a/configure.ac b/configure.ac index a7a29b327..22c1e007e 100644 --- a/configure.ac +++ b/configure.ac @@ -119,6 +119,8 @@ PKG_CHECK_MODULES([Lua], [lua >= 5.1],, [AC_MSG_ERROR([awesome requires Lua >= 5.1.])])]) PKG_CHECK_MODULES([glib], [glib-2.0],, [AC_MSG_ERROR([awesome requires glib-2.0.])]) +PKG_CHECK_MODULES([gthread], [gthread-2.0],, + [AC_MSG_ERROR([awesome requires gthread-2.0.])]) PKG_CHECK_MODULES([dbus], [dbus-1],, [AC_MSG_ERROR([awesome requires dbus-1.])]) AC_ARG_WITH([imlib2], AS_HELP_STRING([--with-imlib2], [Build with Imlib2 (default: disabled)]))