X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=otk%2Feventhandler.cc;h=e4a24df81782e87d38d54bb220d9897f62de61f6;hb=8f8acc24933830d4f5784616b9b0c5896bde0b93;hp=cab95e17ce8db25daa865e4d58b4898ac672c310;hpb=6f5e60f0337e60d904a8f549aeaa631afefc8033;p=chaz%2Fopenbox diff --git a/otk/eventhandler.cc b/otk/eventhandler.cc index cab95e17..e4a24df8 100644 --- a/otk/eventhandler.cc +++ b/otk/eventhandler.cc @@ -1,19 +1,25 @@ +// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- + +#ifdef HAVE_CONFIG_H +# include "../config.h" +#endif + +#include "display.hh" #include "eventhandler.hh" -#include namespace otk { -OtkEventHandler::OtkEventHandler() +EventHandler::EventHandler() { } -OtkEventHandler::~OtkEventHandler() +EventHandler::~EventHandler() { } -int OtkEventHandler::handle(const XEvent &e) +void EventHandler::handle(const XEvent &e) { switch(e.type){ case KeyPress: @@ -24,6 +30,8 @@ int OtkEventHandler::handle(const XEvent &e) return buttonPressHandler(e.xbutton); case ButtonRelease: return buttonReleaseHandler(e.xbutton); + case MotionNotify: + return motionHandler(e.xmotion); case EnterNotify: return enterHandler(e.xcrossing); case LeaveNotify: @@ -78,8 +86,23 @@ int OtkEventHandler::handle(const XEvent &e) return selectionHandler(e.xselection); case SelectionRequest: return selectionRequestHandler(e.xselectionrequest); - }; - return 0; + default: +#ifdef SHAPE + if (e.type == Display::shapeEventBase()) + return shapeHandler((*(XShapeEvent*)&e)); +#endif // SHAPE +#ifdef XKB + if (e.type == Display::xkbEventBase()) + return xkbHandler((*(XkbEvent*)&e)); +#endif // XKB + ; + } +} + + +void EventHandler::clientMessageHandler(const XClientMessageEvent &) +{ + } }