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
This commit is contained in:
parent
7a95b5a949
commit
a0333b52d8
1 changed files with 11 additions and 0 deletions
|
@ -88,6 +88,17 @@ void OBActions::buttonPressHandler(const XButtonEvent &e)
|
||||||
if (_button) return; // won't count toward CLICK events
|
if (_button) return; // won't count toward CLICK events
|
||||||
|
|
||||||
_button = e.button;
|
_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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue