From: Dana Jansens Date: Fri, 10 Jan 2003 19:17:26 +0000 (+0000) Subject: when i get a button press on the client window, i have to manufacture the release... X-Git-Url: https://git.brokenzipper.com/gitweb?a=commitdiff_plain;h=a0333b52d8db7e68a440236b132ffd3b7629872f;p=chaz%2Fopenbox when i get a button press on the client window, i have to manufacture the release, because i never will get one from the x server --- diff --git a/src/actions.cc b/src/actions.cc index 7b538de6..309323cc 100644 --- a/src/actions.cc +++ b/src/actions.cc @@ -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); + } }