aboutsummaryrefslogtreecommitdiffstats
path: root/xevents.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--xevents.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/xevents.c b/xevents.c
index aa9856b..61fe476 100644
--- a/xevents.c
+++ b/xevents.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $OpenBSD: xevents.c,v 1.131 2017/12/29 16:55:50 okan Exp $
+ * $OpenBSD: xevents.c,v 1.132 2017/12/29 18:50:43 okan Exp $
*/
/*
@@ -324,6 +324,7 @@ xev_handle_keyrelease(XEvent *ee)
{
XKeyEvent *e = &ee->xkey;
struct screen_ctx *sc;
+ struct client_ctx *cc;
KeySym keysym;
unsigned int i;
@@ -333,7 +334,17 @@ xev_handle_keyrelease(XEvent *ee)
keysym = XkbKeycodeToKeysym(X_Dpy, e->keycode, 0, 0);
for (i = 0; i < nitems(modkeys); i++) {
if (keysym == modkeys[i]) {
- client_cycle_leave(sc);
+ if ((cc = client_current()) != NULL) {
+ if (sc->cycling) {
+ sc->cycling = 0;
+ client_mtf(cc);
+ }
+ if (cc->flags & CLIENT_HIGHLIGHT) {
+ cc->flags &= ~CLIENT_HIGHLIGHT;
+ client_draw_border(cc);
+ }
+ }
+ XUngrabKeyboard(X_Dpy, CurrentTime);
break;
}
}