Fix #31514: Open blends via drag-n'-drop doesn't work when splash screen is on
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 25 May 2012 14:57:17 +0000 (14:57 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Fri, 25 May 2012 14:57:17 +0000 (14:57 +0000)
Do not block EVT_DROP event from popup handler.
Not ideal solution sine it'll be much nicer to cleanup event handling order,
but should be acceptable for now.

source/blender/editors/interface/interface_handlers.c

index 428ddb3..58dfabd 100644 (file)
@@ -6574,7 +6574,16 @@ static int ui_handler_popup(bContext *C, wmEvent *event, void *userdata)
        /* delayed apply callbacks */
        ui_apply_but_funcs_after(C);
 
-       /* we block all events, this is modal interaction */
+       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)
+                */
+
+               return WM_UI_HANDLER_CONTINUE;
+       }
+
+       /* we block all events, this is modal interaction, except for drop events which is described above */
        return WM_UI_HANDLER_BREAK;
 }