From cbbe2779fad60b4717b80afeefc58ce1f6e6b9b0 Mon Sep 17 00:00:00 2001 From: Reginald Kennedy Date: Tue, 18 Nov 2014 11:20:38 +0800 Subject: [PATCH] Prevent possible focus change on release of a pointer grab. --- spectrwm.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spectrwm.c b/spectrwm.c index fe68684..30ee09f 100644 --- a/spectrwm.c +++ b/spectrwm.c @@ -9615,6 +9615,12 @@ enternotify(xcb_enter_notify_event_t *e) return; } + if (focus_mode != SWM_FOCUS_FOLLOW && + e->mode == XCB_NOTIFY_MODE_UNGRAB) { + DNPRINTF(SWM_D_EVENT, "enternotify: ungrab; ignoring.\n"); + return; + } + last_event_time = e->time; if ((win = find_window(e->event)) == NULL) { -- 2.39.2