From a16e62849d6497f35fb8dd49b522da363083ffd6 Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 28 Sep 2026 10:25:43 +0000 Subject: [PATCH] Fix dragging a floating pane by its top border over a tiled pane's status line, GitHub issue 5645 from Michael Grant. --- window.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/window.c b/window.c index 8ce484d26..e93a854f9 100644 --- a/window.c +++ b/window.c @@ -1,4 +1,4 @@ -/* $OpenBSD: window.c,v 1.381 2026/09/28 10:10:16 nicm Exp $ */ +/* $OpenBSD: window.c,v 1.382 2026/09/28 10:25:43 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -844,6 +844,16 @@ window_get_active_at(struct window *w, u_int x, u_int y) return (NULL); } + /* + * A floating pane is above every tiled pane, including their status + * lines, so check those first. + */ + TAILQ_FOREACH(wp, &w->z_index, zentry) { + if (window_pane_is_floating(wp) && + window_pane_contains(wp, x, y)) + return (wp); + } + if (pane_status == PANE_STATUS_TOP) { /* * Prefer a pane's top border status line over the pane above's