From 99237cc232621055843e6e26bf9fb3c29969aed1 Mon Sep 17 00:00:00 2001 From: Consolatis <35009135+Consolatis@users.noreply.github.com> Date: Mon, 29 Aug 2022 23:06:53 +0200 Subject: [PATCH] src/config/mousebind.c: Fix mousebind ordering --- src/config/mousebind.c | 2 +- src/cursor.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/config/mousebind.c b/src/config/mousebind.c index 9d44f735..075d89aa 100644 --- a/src/config/mousebind.c +++ b/src/config/mousebind.c @@ -111,7 +111,7 @@ mousebind_create(const char *context) struct mousebind *m = calloc(1, sizeof(struct mousebind)); m->context = context_from_str(context); if (m->context != LAB_SSD_NONE) { - wl_list_insert(&rc.mousebinds, &m->link); + wl_list_insert(rc.mousebinds.prev, &m->link); } wl_list_init(&m->actions); return m; diff --git a/src/cursor.c b/src/cursor.c index 86bac659..0479b656 100644 --- a/src/cursor.c +++ b/src/cursor.c @@ -547,7 +547,7 @@ handle_release_mousebinding(struct view *view, struct server *server, bool activated_any = false; bool activated_any_frame = false; - wl_list_for_each_reverse(mousebind, &rc.mousebinds, link) { + wl_list_for_each(mousebind, &rc.mousebinds, link) { if (ssd_part_contains(mousebind->context, view_area) && mousebind->button == button && modifiers == mousebind->modifiers) { @@ -629,7 +629,7 @@ handle_press_mousebinding(struct view *view, struct server *server, bool activated_any = false; bool activated_any_frame = false; - wl_list_for_each_reverse(mousebind, &rc.mousebinds, link) { + wl_list_for_each(mousebind, &rc.mousebinds, link) { if (ssd_part_contains(mousebind->context, view_area) && mousebind->button == button && modifiers == mousebind->modifiers) {