Refactor: allow event handlers to have a poll function

Previously only a fixed bounding box could be used.
This was not flexible enough.
T63193 will benefit from this refactor.

Reviewers: brecht, campbellbarton
This commit is contained in:
2019-04-24 17:34:48 +02:00
parent 7a92b8820b
commit ea80264381
16 changed files with 92 additions and 98 deletions

View File

@@ -116,7 +116,7 @@ static void script_main_region_init(wmWindowManager *wm, ARegion *ar)
/* own keymap */
keymap = WM_keymap_ensure(wm->defaultconf, "Script", SPACE_SCRIPT, 0);
WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct);
WM_event_add_keymap_handler_v2d_mask(&ar->handlers, keymap);
}
static void script_main_region_draw(const bContext *C, ARegion *ar)