From 28f9f832305677d4faab4548e336f56586143e92 Mon Sep 17 00:00:00 2001 From: William Kendrick Date: Fri, 14 Jan 2005 09:16:40 +0000 Subject: [PATCH] Only mouse button 1 works for clicking. 2 and 3 (middle/right) are ignored. --- docs/CHANGES.txt | 3 +++ src/tuxpaint.c | 14 +++++--------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/docs/CHANGES.txt b/docs/CHANGES.txt index 6cdea2329..6d732321a 100644 --- a/docs/CHANGES.txt +++ b/docs/CHANGES.txt @@ -100,6 +100,9 @@ http://www.newbreedsoftware.com/tuxpaint/ * Interface improvements: ----------------------- + * Middle and right mouse buttons no longer do anything. + (No reason to teach kids that all the buttons do the same thing!) + * Thumbnail of selected image now shown on "Erase this image?" confirmation pop-up. diff --git a/src/tuxpaint.c b/src/tuxpaint.c index 85591d3a8..1914c7e26 100644 --- a/src/tuxpaint.c +++ b/src/tuxpaint.c @@ -2758,9 +2758,8 @@ static void mainloop(void) } } } - else if ((event.type == SDL_MOUSEBUTTONDOWN && - event.button.button >= 1 && - event.button.button <= 3)) + else if (event.type == SDL_MOUSEBUTTONDOWN && + event.button.button == 1) { if (HIT(r_tools)) { @@ -10569,8 +10568,7 @@ static void do_wait(void) done = 1; } else if (event.type == SDL_MOUSEBUTTONDOWN && - event.button.button >= 1 && - event.button.button <= 3) + event.button.button == 1) { done = 1; } @@ -11309,8 +11307,7 @@ static int do_prompt_image(const char * const text, const char * const btn_yes, } } else if (event.type == SDL_MOUSEBUTTONDOWN && - event.button.button >= 1 && - event.button.button <= 3) + event.button.button == 1) { if (event.button.x >= 166 + PROMPTOFFSETX && event.button.x < 166 + PROMPTOFFSETX + 48) @@ -13057,8 +13054,7 @@ static int do_open(int want_new_tool) } } else if (event.type == SDL_MOUSEBUTTONDOWN && - event.button.button >= 1 && - event.button.button <= 3) + event.button.button >= 1) { if (event.button.x >= 96 && event.button.x < WINDOW_WIDTH - 96 && event.button.y >= 24 &&