parent
99e1576927
commit
4f71661dfe
1
src/E.h
1
src/E.h
|
@ -303,6 +303,7 @@ typedef struct {
|
|||
int mask_alpha_threshold;
|
||||
char enable_startup_id;
|
||||
char use_render_for_scaling;
|
||||
char bindings_reload;
|
||||
unsigned int no_sync_mask;
|
||||
} testing;
|
||||
|
||||
|
|
17
src/aclass.c
17
src/aclass.c
|
@ -30,6 +30,7 @@
|
|||
#include "ewins.h"
|
||||
#include "file.h"
|
||||
#include "grabs.h"
|
||||
#include "timers.h"
|
||||
#include <ctype.h>
|
||||
|
||||
typedef struct _actiontype {
|
||||
|
@ -1102,6 +1103,22 @@ ActionclassesGlobalEvent(XEvent * ev)
|
|||
return match;
|
||||
}
|
||||
|
||||
static int
|
||||
_ac_reload(void *data __UNUSED__)
|
||||
{
|
||||
AclassConfigLoadConfig("bindings.cfg");
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
ActionclassesReload(void)
|
||||
{
|
||||
static Timer *ac_reload_timer;
|
||||
|
||||
TIMER_DEL(ac_reload_timer);
|
||||
TIMER_ADD(ac_reload_timer, 0.2, _ac_reload, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Actions module
|
||||
*/
|
||||
|
|
|
@ -47,6 +47,7 @@ Action *ActionclassGetAction(ActionClass * ac, int ix);
|
|||
int ActionclassEvent(ActionClass * ac, XEvent * ev,
|
||||
EWin * ewin);
|
||||
int ActionclassesGlobalEvent(XEvent * ev);
|
||||
void ActionclassesReload(void);
|
||||
|
||||
const char *ActionGetTooltipString(Action * aa);
|
||||
int ActionGetAnybutton(Action * aa);
|
||||
|
|
10
src/events.c
10
src/events.c
|
@ -422,6 +422,11 @@ HandleEvent(XEvent * ev)
|
|||
EUnregisterXwin(ev->xdestroywindow.window);
|
||||
break;
|
||||
#endif
|
||||
|
||||
case MappingNotify:
|
||||
if (Conf.testing.bindings_reload)
|
||||
ActionclassesReload();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -998,6 +1003,11 @@ EventShow(const XEvent * ev)
|
|||
ev->xclient.data.l[4]);
|
||||
XFree(txt);
|
||||
break;
|
||||
case MappingNotify:
|
||||
Eprintf("%s req=%d first=%d count=%d\n",
|
||||
buf, ev->xmapping.request,
|
||||
ev->xmapping.first_keycode, ev->xmapping.count);
|
||||
break;
|
||||
|
||||
case EX_EVENT_SHAPE_NOTIFY:
|
||||
#define se ((XShapeEvent *)ev)
|
||||
|
|
|
@ -202,6 +202,7 @@ static const CfgItem MiscCfgItems[] = {
|
|||
CFG_ITEM_INT(Conf, testing.mask_alpha_threshold, 8),
|
||||
CFG_ITEM_BOOL(Conf, testing.enable_startup_id, 1),
|
||||
CFG_ITEM_BOOL(Conf, testing.use_render_for_scaling, 0),
|
||||
CFG_ITEM_BOOL(Conf, testing.bindings_reload, 1),
|
||||
CFG_ITEM_HEX(Conf, testing.no_sync_mask, 0),
|
||||
|
||||
CFG_ITEM_BOOL(Conf, autosave, 1),
|
||||
|
|
Loading…
Reference in New Issue