diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2015-04-05 20:32:57 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2015-04-05 20:32:57 +0300 |
commit | 776bfa64a53191b6f6aba107449be9353b7a2bee (patch) | |
tree | 86d3149974beb90b55999004d57bbb1049fa5b43 /source/blender/windowmanager/intern/wm_window.c | |
parent | af23e8d44a6c70ce98a15d0aa2721c152c578dae (diff) |
Stickies: Don't send extra event on KM_CLICK
Just add KM_CLICK to the already sent KM_RELEASE, don't send a new one
for this.
This might help us to get rid of quite some glitches and workarounds \o/
(why didn't this come earlier to my mind? :S)
Diffstat (limited to 'source/blender/windowmanager/intern/wm_window.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_window.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index 5c05d86da57..1af20e6036d 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -1098,9 +1098,9 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr C_void_ptr } /** - * #KM_DBL_CLICK is set in wm_event_clicktype_init (wm_event_system.c) - * Normally, this should be there too, but for #KM_CLICK/#KM_HOLD, we need a - * time precision of a few milliseconds, which we can't get from there + * #KM_DBL_CLICK and #KM_CLICK are set in wm_event_clicktype_init (wm_event_system.c) + * Normally, #KM_HOLD should be there too, but we need a time precision of a few + * milliseconds for it, which we can't get from there */ static void wm_window_event_clicktype_init(const bContext *C) { @@ -1141,14 +1141,7 @@ static void wm_window_event_clicktype_init(const bContext *C) /* the actual test */ if ((PIL_check_seconds_timer() - event->click_time) * 1000 <= U.click_timeout) { - /* for any reason some X11 systems send two release events triggering two KM_CLICK - * events - making the rules more strict by checking for prevval resolves this */ - if (event->val == KM_RELEASE && event->prevval != KM_RELEASE) { - click_type = KM_CLICK; - if (G.debug & (G_DEBUG_HANDLERS | G_DEBUG_EVENTS)) { - printf("%s Send click event\n", __func__); - } - } + /* sending of KM_CLICK is handled in wm_event_clicktype_init (wm_event_system.c) */ } else if (event->is_key_pressed) { click_type = KM_HOLD; |