summaryrefslogtreecommitdiff
path: root/options.c
diff options
context:
space:
mode:
authorPhilippe Brochard <hocwp@free.fr>2010-01-23 23:27:28 +0100
committerPhilippe Brochard <hocwp@free.fr>2010-01-23 23:27:28 +0100
commit6ed7b563137fc002dae373e0f8a6362263373000 (patch)
tree159a340d97e04928533fb64e9b1279ea1b2300fd /options.c
parenteeacc6bcbd1ce68fb9741447c71a8fa107ffeb3a (diff)
downloadxbindkeys-6ed7b563137fc002dae373e0f8a6362263373000.tar.gz
xbindkeys.c (event_loop): Stat both default rc file and guile rc file for reloading them when they change.
Diffstat (limited to 'options.c')
-rw-r--r--options.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/options.c b/options.c
index 61b3186..87ba9ad 100644
--- a/options.c
+++ b/options.c
@@ -15,6 +15,7 @@
* *
***************************************************************************/
+#include "config.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
@@ -24,10 +25,10 @@
#include "xbindkeys.h"
#include "keys.h"
#include "grab_key.h"
+
#ifdef GUILE_FLAG
#include <libguile.h>
#endif
-#include "config.h"
char *display_name = NULL;
@@ -1017,6 +1018,8 @@ SCM xbindkey_wrapper(SCM key, SCM cmd)
}
+SCM tab_scm[2];
+
SCM xbindkey_function_wrapper (SCM key, SCM fun)
{
KeyType_t type = SYM;
@@ -1032,12 +1035,20 @@ SCM xbindkey_function_wrapper (SCM key, SCM fun)
return SCM_BOOL_F;
}
+ tab_scm[0] = fun;
+
if (add_key (type, event_type, keysym, keycode,
- button, modifier, NULL, fun) != 0)
+ button, modifier, NULL, tab_scm[0]) != 0)
{
printf("add_key didn't return 0!!!\n");
return SCM_BOOL_F;
}
+ else {
+ printf ("add_key ok!!! fun=%d\n", gh_procedure_p (fun));
+ }
+
+ //scm_permanent_object (tab_scm[0]);
+ scm_remember_upto_here_1 (tab_scm[0]);
return SCM_UNSPECIFIED;
}