X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=otk%2Feventhandler.cc;h=c867d809c8294aef3b70dfd43f7a2ff8a25b70bd;hb=63a74632ac39d445cb15cda510c8267da9ff6bbb;hp=9d37bcff25204e2d911f2788307f4120017f1366;hpb=12a95bfdb31595ec53d72adef4e0fd6bf1ccf218;p=chaz%2Fopenbox diff --git a/otk/eventhandler.cc b/otk/eventhandler.cc index 9d37bcff..c867d809 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() { } -void OtkEventHandler::handle(const XEvent &e) +void EventHandler::handle(const XEvent &e) { switch(e.type){ case KeyPress: @@ -24,6 +30,8 @@ void 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,7 +86,23 @@ void OtkEventHandler::handle(const XEvent &e) return selectionHandler(e.xselection); case SelectionRequest: return selectionRequestHandler(e.xselectionrequest); - }; + 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 &) +{ + } }