From dc236e25d2cbb5fe6c0cfd19486523bf30a76ad1 Mon Sep 17 00:00:00 2001 From: Dustin Falgout Date: Sun, 18 Oct 2015 21:03:19 -0500 Subject: [PATCH] Use glib helper function to set sigterm signal. Fixes #12 --- NEWS | 5 +++++ configure.ac | 2 +- src/lightdm-webkit2-greeter.c | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index dbb00dd..355f8fe 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,8 @@ +Overview of changes in lightdm-webkit-greeter 0.2.2 + + * Call gtk_init() as early as possible to prevent widget drawing failures. + * Use glib helper function to set sigterm signal + Overview of changes in lightdm-webkit-greeter 0.2.1 * Handle tasks that a WM would normally handle. diff --git a/configure.ac b/configure.ac index b747ecd..061756b 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(lightdm-webkit2-greeter, 0.2.1) +AC_INIT(lightdm-webkit2-greeter, 0.2.2) AC_SUBST(THEME_DIR) AC_CONFIG_HEADER(config.h) diff --git a/src/lightdm-webkit2-greeter.c b/src/lightdm-webkit2-greeter.c index 2bf086b..b94c37f 100644 --- a/src/lightdm-webkit2-greeter.c +++ b/src/lightdm-webkit2-greeter.c @@ -108,9 +108,9 @@ main(int argc, char **argv) { gchar *theme; GdkRGBA bg_color; - gtk_init(&argc, &argv); + g_unix_signal_add(SIGTERM, (GSourceFunc)sigterm_cb, /* is_callback */ GINT_TO_POINTER (TRUE)); - signal(SIGTERM, sigterm_cb); + gtk_init(&argc, &argv); WebKitWebContext *context = webkit_web_context_get_default(); g_signal_connect(context,