summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
3953adc)
When handling global animation events that trigger user events handled
as either key, gadget or screen events, prevent creating additional
key or button events to be handled by global animations again, as this
can confuse further button event processing, which may cause buttons
or menu items to be selected by accident.
static boolean special_cursor_enabled = FALSE;
static boolean stop_processing_events = FALSE;
static boolean special_cursor_enabled = FALSE;
static boolean stop_processing_events = FALSE;
+static boolean is_global_anim_event = FALSE;
// forward declarations for internal use
// forward declarations for internal use
ignore_repeated_key = FALSE;
// send key release event to global animation event handling
ignore_repeated_key = FALSE;
// send key release event to global animation event handling
- HandleGlobalAnimClicks(-1, -1, KEY_RELEASED, FALSE);
+ if (!is_global_anim_event)
+ HandleGlobalAnimClicks(-1, -1, KEY_RELEASED, FALSE);
}
// some key events are handled like clicks for global animations
}
// some key events are handled like clicks for global animations
- boolean click = (key == KSYM_space ||
- key == KSYM_Return ||
- key == KSYM_Escape);
+ boolean click = (!is_global_anim_event && (key == KSYM_space ||
+ key == KSYM_Return ||
+ key == KSYM_Escape));
if (click && HandleGlobalAnimClicks(-1, -1, MB_LEFTBUTTON, TRUE))
{
if (click && HandleGlobalAnimClicks(-1, -1, MB_LEFTBUTTON, TRUE))
{
{
Key key = (Key)(-keysym);
{
Key key = (Key)(-keysym);
+ is_global_anim_event = TRUE;
+
HandleKey(key, KEY_PRESSED);
HandleKey(key, KEY_RELEASED);
HandleKey(key, KEY_PRESSED);
HandleKey(key, KEY_RELEASED);
+ is_global_anim_event = FALSE;
+