summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2015-02-19 13:22:10 +0100
committerDave Davenport <qball@gmpclient.org>2015-02-19 13:22:10 +0100
commitda8902ac8818637b659f55431ad735b47637eb10 (patch)
tree2d9ecdf3183e5ffd2362e029a81eddd65d31e12f
parentd9db18266c65d3a9e2e2fc71289949ec53e32f1c (diff)
Replace signal by sigaction
-rw-r--r--Changelog1
-rw-r--r--include/textbox.h12
-rw-r--r--source/dialogs/run-dialog.c4
-rw-r--r--source/dialogs/ssh-dialog.c6
-rw-r--r--source/rofi.c5
5 files changed, 16 insertions, 12 deletions
diff --git a/Changelog b/Changelog
index 900f13c2..5f99b88e 100644
--- a/Changelog
+++ b/Changelog
@@ -2,6 +2,7 @@
Removed features:
- Remove (broken) hmode
- Old style key binding and mode launcher.
+ - Old TIMING code.
New features:
- Word movement in entry box. (#126)
- PID file to avoid duplicate Rofi.
diff --git a/include/textbox.h b/include/textbox.h
index c37f3cea..8252ac3b 100644
--- a/include/textbox.h
+++ b/include/textbox.h
@@ -22,12 +22,12 @@ typedef struct
typedef enum
{
- TB_AUTOHEIGHT = 1 << 0,
- TB_AUTOWIDTH = 1 << 1,
- TB_LEFT = 1 << 16,
- TB_RIGHT = 1 << 17,
- TB_CENTER = 1 << 18,
- TB_EDITABLE = 1 << 19,
+ TB_AUTOHEIGHT = 1 << 0,
+ TB_AUTOWIDTH = 1 << 1,
+ TB_LEFT = 1 << 16,
+ TB_RIGHT = 1 << 17,
+ TB_CENTER = 1 << 18,
+ TB_EDITABLE = 1 << 19,
} TextboxFlags;
diff --git a/source/dialogs/run-dialog.c b/source/dialogs/run-dialog.c
index 0488f74f..b4ea5ea1 100644
--- a/source/dialogs/run-dialog.c
+++ b/source/dialogs/run-dialog.c
@@ -170,8 +170,8 @@ static char ** get_apps_external ( char **retv, unsigned int *length, unsigned i
*/
static char ** get_apps ( char **retv, unsigned int *length )
{
- unsigned int num_favorites = 0;
- char *path;
+ unsigned int num_favorites = 0;
+ char *path;
if ( getenv ( "PATH" ) == NULL ) {
return NULL;
diff --git a/source/dialogs/ssh-dialog.c b/source/dialogs/ssh-dialog.c
index 43ce573a..d9b280a3 100644
--- a/source/dialogs/ssh-dialog.c
+++ b/source/dialogs/ssh-dialog.c
@@ -114,9 +114,9 @@ static int ssh_sort_func ( const void *a, const void *b )
}
static char ** get_ssh ( unsigned int *length )
{
- unsigned int num_favorites = 0;
- char *path;
- char **retv = NULL;
+ unsigned int num_favorites = 0;
+ char *path;
+ char **retv = NULL;
if ( getenv ( "HOME" ) == NULL ) {
return NULL;
diff --git a/source/rofi.c b/source/rofi.c
index 4c6dc043..a2f05d6c 100644
--- a/source/rofi.c
+++ b/source/rofi.c
@@ -1715,7 +1715,10 @@ int main ( int argc, char *argv[] )
}
// Set up X interaction.
- signal ( SIGCHLD, catch_exit );
+ const struct sigaction sigchld_action = {
+ .sa_handler = catch_exit
+ };
+ sigaction ( SIGCHLD, &sigchld_action, NULL );
x11_setup ( display );