]> git.mdlowis.com Git - proto/labwc.git/commitdiff
src/config/mousebind.c: Fix mousebind ordering
authorConsolatis <35009135+Consolatis@users.noreply.github.com>
Mon, 29 Aug 2022 21:06:53 +0000 (23:06 +0200)
committerJohan Malm <johanmalm@users.noreply.github.com>
Tue, 30 Aug 2022 15:39:09 +0000 (16:39 +0100)
src/config/mousebind.c
src/cursor.c

index 9d44f7351288665e1c48bf9b5382f1fcda93d387..075d89aa7e1dba9622623538ac67451f45d6648d 100644 (file)
@@ -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;
index 86bac65906ff324426a5142d40601604b0b86ced..0479b6564e6e0c9c6860b6f2bf8ea084aa5eb30e 100644 (file)
@@ -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) {