diff options
| author | Simon Tatham <anakin@pobox.com> | 2005-01-25 14:07:46 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2005-01-25 14:07:46 +0000 |
| commit | 8b91de196c8cb21c57763fe80010edb889a7a8f6 (patch) | |
| tree | 6bd4fc4341e08d009d34773e64914cb305a6aa01 /puzzles.h | |
| parent | 8ae25046d843667ce0ec671ed8c72d58aaef7000 (diff) | |
| download | puzzles-8b91de196c8cb21c57763fe80010edb889a7a8f6.zip puzzles-8b91de196c8cb21c57763fe80010edb889a7a8f6.tar.gz puzzles-8b91de196c8cb21c57763fe80010edb889a7a8f6.tar.bz2 puzzles-8b91de196c8cb21c57763fe80010edb889a7a8f6.tar.xz | |
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]
Diffstat (limited to 'puzzles.h')
| -rw-r--r-- | puzzles.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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; |