summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeonardo Hernández Hernández <leohdz172@protonmail.com>2022-10-31 23:33:23 -0600
committerLeonardo Hernández Hernández <leohdz172@protonmail.com>2022-10-31 23:46:02 -0600
commit3cc22de712415342e4865eef099fcfde49bcf734 (patch)
tree93ce38e072d2eacbba8c3d142be965e3bd4588c7
parent846ce52b926797dc51f9fcdc2d121ee63fb68580 (diff)
client: don't change border color during drags
Fixes: https://github.com/djpohly/dwl/issues/318
-rw-r--r--dwl.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/dwl.c b/dwl.c
index 2baa659..9080115 100644
--- a/dwl.c
+++ b/dwl.c
@@ -1185,8 +1185,9 @@ focusclient(Client *c, int lift)
c->isurgent = 0;
client_restack_surface(c);
- /* Don't change border color if there is an exclusive focus */
- if (!exclusive_focus)
+ /* Don't change border color if there is an exclusive focus or we are
+ * handling a drag operation */
+ if (!exclusive_focus && !seat->drag)
for (i = 0; i < 4; i++)
wlr_scene_rect_set_color(c->border[i], focuscolor);
}
@@ -2261,6 +2262,9 @@ void
startdrag(struct wl_listener *listener, void *data)
{
struct wlr_drag *drag = data;
+ /* During drag the focus isn't sent to clients, this causes that
+ * we don't update border color acording the pointer coordinates */
+ focusclient(NULL, 0);
if (!drag->icon)
return;