X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Factions.cc;h=309323cca6281c323e027a2bd093e7d066b27597;hb=a0333b52d8db7e68a440236b132ffd3b7629872f;hp=e758dd0d056d8f383104908a52f833dd58e3137c;hpb=b67f5e702e3cc12e4217dd31e2c522dde1ee19b0;p=chaz%2Fopenbox diff --git a/src/actions.cc b/src/actions.cc index e758dd0d..309323cc 100644 --- a/src/actions.cc +++ b/src/actions.cc @@ -5,7 +5,7 @@ #endif #include "actions.hh" -#include "widget.hh" +#include "widgetbase.hh" #include "openbox.hh" #include "client.hh" #include "screen.hh" @@ -88,6 +88,17 @@ void OBActions::buttonPressHandler(const XButtonEvent &e) if (_button) return; // won't count toward CLICK events _button = e.button; + + if (w->mcontext() == MC_Window) { + /* + Because of how events are grabbed on the client window, we can't get + ButtonRelease events, so instead we simply manufacture them here, so that + clicks/doubleclicks etc still work. + */ + XButtonEvent ev = e; + ev.type = ButtonRelease; + buttonReleaseHandler(ev); + } }