Add an argument to the callbacks to pass the xevent context, button or
key press. This allows to remove a few hacks to duplicate functions only for behaviour changes; now differing behaviours are pushed down to the callback. Also will allow for previously unavailable actions to be bind-able down the road.
This commit is contained in:
@@ -244,7 +244,7 @@ xev_handle_buttonpress(XEvent *ee)
|
||||
return;
|
||||
}
|
||||
|
||||
(*mb->callback)(cc, &mb->argument);
|
||||
(*mb->callback)(cc, &mb->argument, CWM_BTN);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -298,7 +298,7 @@ xev_handle_keypress(XEvent *ee)
|
||||
return;
|
||||
}
|
||||
|
||||
(*kb->callback)(cc, &kb->argument);
|
||||
(*kb->callback)(cc, &kb->argument, CWM_KEY);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user