]> git.neil.brown.name Git - edlib.git/commitdiff
ncurses: fix bug that caused us to lose some mouse events.
authorNeilBrown <neil@brown.name>
Wed, 18 Nov 2015 02:47:21 +0000 (13:47 +1100)
committerNeilBrown <neil@brown.name>
Wed, 18 Nov 2015 02:47:21 +0000 (13:47 +1100)
Signed-off-by: NeilBrown <neil@brown.name>
display-ncurses.c

index f4b8a0f19bb67a030c38c95abe20af9afd1aae20..60348b806499d808f90e6895c29931b0ef207359 100644 (file)
@@ -387,9 +387,9 @@ static void send_mouse(MEVENT *mev, struct pane *p)
                char *action;
                if (BUTTON_PRESS(s, b))
                        action = "Press-%d";
-               if (BUTTON_RELEASE(s, b))
+               else if (BUTTON_RELEASE(s, b))
                        action = "Release-%d";
-               if (BUTTON_CLICK(s, b))
+               else if (BUTTON_CLICK(s, b))
                        action = "Click-%d";
                else if (BUTTON_DOUBLE_CLICK(s, b))
                        action = "DClick-%d";