diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2016-03-28 17:42:13 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2016-03-28 17:45:12 +0300 |
commit | 37b7b3a9355af05ad322491c20dab9fb3e79b54d (patch) | |
tree | 2498b3ef664b1bbc21536c54048b21c39b091dcd /source/blender | |
parent | 28ca3ebc5f81347cad53f9a8b946166f469fa7da (diff) |
T47532: Pop-ups drop fast mouse clicks
Caused by rBc24be7ec6e5.
Before rBc24be7ec6e5, wm_handlers_do always called handlers a second time with event value KM_PRESS in case of a double click. After it, this was only the case for non-LEFTMOUSE events.
Since ui_popup_handler (almost) always returned WM_UI_HANDLER_BREAK, the second handler iteration with KM_PRESS wouldn't run. This fix just makes sure we return WM_UI_HANDLER_CONTINUE for double click events instead (causing second iteration to run).
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 83635822765..01fc6aafc4e 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -9954,10 +9954,14 @@ static int ui_popup_handler(bContext *C, const wmEvent *event, void *userdata) menu_region = CTX_wm_menu(C); CTX_wm_menu_set(C, menu->region); - if (event->type == EVT_DROP) { - /* if we're handling drop event we'll want it to be handled by popup callee as well, - * so it'll be possible to perform such operations as opening .blend files by dropping - * them into blender even if there's opened popup like splash screen (sergey) + if (event->type == EVT_DROP || event->val == KM_DBL_CLICK) { + /* EVT_DROP: + * If we're handling drop event we'll want it to be handled by popup callee as well, + * so it'll be possible to perform such operations as opening .blend files by dropping + * them into blender, even if there's opened popup like splash screen (sergey). + * KM_DBL_CLICK: + * Continue in case of double click so wm_handlers_do calls handler again with KM_PRESS + * event. This is needed to ensure correct button handling for fast clicking (T47532). */ retval = WM_UI_HANDLER_CONTINUE; |