From 86e2c481f56ad0ea549838666d9fda03519fe1ef Mon Sep 17 00:00:00 2001 From: okan Date: Fri, 16 Sep 2016 14:32:02 +0000 Subject: During init, query screen for _NET_ACTIVE_WINDOW and set that client as active; while we already look at what's under the pointer, use this information first, then look under the pointer (saving that round-trip). This restores the active state to a client after restart even if the pointer is not above it (and of course the pointer is not above another client). --- xevents.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xevents.c') diff --git a/xevents.c b/xevents.c index d82a3d2..cda021b 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.121 2016/09/14 19:45:33 okan Exp $ + * $OpenBSD: xevents.c,v 1.122 2016/09/16 14:32:02 okan Exp $ */ /* @@ -81,7 +81,7 @@ xev_handle_maprequest(XEvent *ee) client_ptrsave(old_cc); if ((cc = client_find(e->window)) == NULL) - cc = client_init(e->window, NULL); + cc = client_init(e->window, NULL, 0); if ((cc != NULL) && (!(cc->flags & CLIENT_IGNORE))) client_ptrwarp(cc); -- cgit v1.2.3-2-gb3c3