Include code in midend.c to sanitise streams of mouse events so that

back ends can be assured of always receiving them in a sensible
sequence (button-down, followed by zero or more drags, followed by
button-up, and never changing button in the middle of such a
sequence). I have a suspicion this issue was the cause of the
mysterious Pattern grid updates seen by Dan during testing last
night.

[originally from svn r5208]
This commit is contained in:
Simon Tatham
2005-01-25 14:07:46 +00:00
parent 8ae25046d8
commit 8b91de196c
2 changed files with 105 additions and 1 deletions

View File

@ -34,6 +34,13 @@ enum {
CURSOR_DOWN_RIGHT
};
#define IS_MOUSE_DOWN(m) ( (unsigned)((m) - LEFT_BUTTON) <= \
(unsigned)(RIGHT_BUTTON - LEFT_BUTTON))
#define IS_MOUSE_DRAG(m) ( (unsigned)((m) - LEFT_DRAG) <= \
(unsigned)(RIGHT_DRAG - LEFT_DRAG))
#define IS_MOUSE_RELEASE(m) ( (unsigned)((m) - LEFT_RELEASE) <= \
(unsigned)(RIGHT_RELEASE - LEFT_RELEASE))
#define IGNOREARG(x) ( (x) = (x) )
typedef struct frontend frontend;