mirror of
git://git.tartarus.org/simon/puzzles.git
synced 2025-04-22 08:25:45 -07:00
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:
@ -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;
|
||||
|
Reference in New Issue
Block a user