941
944
if (event->type == xkbEvent.get())
943
946
XkbAnyEvent *xkbEvent = (XkbAnyEvent *) event;
944
static CompOption::Vector o;
947
static CompOption::Vector arg;
949
o[0].setName ("event_window", CompOption::TypeInt);
950
o[1].setName ("window", CompOption::TypeInt);
952
arg[0].setName ("event_window", CompOption::TypeInt);
953
arg[1].setName ("window", CompOption::TypeInt);
953
956
if (xkbEvent->xkb_type == XkbStateNotify)
955
958
XkbStateNotifyEvent *stateEvent = (XkbStateNotifyEvent *) event;
957
o[0].value ().set ((int) orphanData.activeWindow);
958
o[1].value ().set ((int) orphanData.activeWindow);
959
o[2].setName ("modifiers", CompOption::TypeInt);
960
o[2].value ().set ((int) stateEvent->mods);
961
o[3].setName ("time", CompOption::TypeInt);
962
o[3].value ().set ((int) xkbEvent->time);
963
o[7].value ().set ((int) xkbEvent->time);
960
arg[0].value ().set ((int) orphanData.activeWindow);
961
arg[1].value ().set ((int) orphanData.activeWindow);
962
arg[2].setName ("modifiers", CompOption::TypeInt);
963
arg[2].value ().set ((int) stateEvent->mods);
964
arg[3].setName ("time", CompOption::TypeInt);
965
arg[3].value ().set ((int) xkbEvent->time);
966
arg[7].value ().set ((int) xkbEvent->time);
965
968
if (stateEvent->event_type == KeyPress)
966
969
eventManager.resetPossibleTap();
968
971
foreach (CompPlugin *p, CompPlugin::getPlugins ())
970
973
CompOption::Vector &options = p->vTable->getOptions ();
971
if (triggerStateNotifyBindings (options, stateEvent, o))
974
if (triggerStateNotifyBindings (options, stateEvent, arg))
975
978
else if (xkbEvent->xkb_type == XkbBellNotify)
977
o[0].value ().set ((int) orphanData.activeWindow);
978
o[1].value ().set ((int) orphanData.activeWindow);
979
o[2].setName ("time", CompOption::TypeInt);
980
o[2].value ().set ((int) xkbEvent->time);
980
arg[0].value ().set ((int) orphanData.activeWindow);
981
arg[1].value ().set ((int) orphanData.activeWindow);
982
arg[2].setName ("time", CompOption::TypeInt);
983
arg[2].value ().set ((int) xkbEvent->time);
983
987
foreach (CompPlugin *p, CompPlugin::getPlugins ())
985
989
CompOption::Vector &options = p->vTable->getOptions ();
986
if (triggerBellNotifyBindings (options, o))
990
if (triggerBellNotifyBindings (options, arg))