all repos — openbox @ a21c0c55ca06fed3882f2417a8e0862f314dd434

openbox fork - make it a bit more like ryudo

handle keyboard input
Dana Jansens danakj@orodu.net
commit

a21c0c55ca06fed3882f2417a8e0862f314dd434

parent

73f7a0bd69607663050f02acf121f40a739d9619

2 files changed, 9 insertions(+), 15 deletions(-)

jump to
M src/actions.ccsrc/actions.cc

@@ -104,18 +104,18 @@ printf("GUILE: LEAVE: win %lx modifiers %u\n", (long)e.window, e.state);

} -void OBActions::drag(Window win, otk::Point delta, unsigned int modifiers, - unsigned int button, Time time) +void OBActions::keyPressHandler(const XKeyEvent &e) { - (void)win;(void)delta;(void)modifiers;(void)button;(void)time; - - // XXX: some guile shit... + // XXX: run the KEY guile hook + printf("GUILE: KEY: win %lx modifiers %u keycode %u\n", + (long)e.window, e.state, e.keycode); } -void OBActions::key(Window win, unsigned int modifiers, unsigned int keycode) +void OBActions::drag(Window win, otk::Point delta, unsigned int modifiers, + unsigned int button, Time time) { - (void)win;(void)modifiers;(void)keycode; + (void)win;(void)delta;(void)modifiers;(void)button;(void)time; // XXX: some guile shit... }
M src/actions.hhsrc/actions.hh

@@ -48,6 +48,8 @@

virtual void enterHandler(const XCrossingEvent &e); virtual void leaveHandler(const XCrossingEvent &e); + virtual void keyPressHandler(const XKeyEvent &e); + //! Notify that a mouse drag is taking place. /*! @param win The window the drag is on

@@ -56,14 +58,6 @@ @param modifiers The modifier state during the drag.

*/ void drag(Window win, otk::Point delta, unsigned int modifiers, unsigned int button, Time time); - - //! Notify that a key press has occured on a window. - /*! - @param win The window the key press was on - @param modifiers The modifier state for the action. - @param keycode The keycode of the key pressed. - */ - void key(Window win, unsigned int modifiers, unsigned int keycode); }; }