e->type == MotionNotify)
mouse_event(client, context, e);
else if (e->type == KeyPress)
- keyboard_event(client, e);
+ /* when in the middle of a focus cycling action, this
+ causes the window which appears to be focused to be
+ the one on which the actions will be executed */
+ keyboard_event((focus_cycle_target ?
+ focus_cycle_target : client), e);
}
}
}
else {
if ((e = menu_entry_frame_under(ev->xbutton.x_root,
ev->xbutton.y_root)))
- menu_entry_frame_execute(e,
- !(ev->xbutton.state & ControlMask));
+ menu_entry_frame_execute(e, ev->xbutton.state);
}
break;
case MotionNotify:
else if (ev->xkey.keycode == ob_keycode(OB_KEY_RETURN)) {
ObMenuFrame *f;
if ((f = find_active_menu()))
- menu_entry_frame_execute(f->selected,
- !(ev->xkey.state & ControlMask));
+ menu_entry_frame_execute(f->selected, ev->xkey.state);
} else if (ev->xkey.keycode == ob_keycode(OB_KEY_LEFT)) {
ObMenuFrame *f;
if ((f = find_active_menu()) && f->parent)