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).
This commit is contained in:
parent
28ca3ebc5f
commit
37b7b3a935
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user