Code cleanup: remove WM subwindows.

These no longer made much sense after regions were added, they just
duplicated state that was already in the regions.
This commit is contained in:
2018-02-16 22:41:46 +01:00
parent cbd0e09898
commit 5d3f679013
25 changed files with 187 additions and 544 deletions

View File

@@ -182,7 +182,6 @@ static bool wm_test_duplicate_notifier(wmWindowManager *wm, unsigned int type, v
/* XXX: in future, which notifiers to send to other windows? */
void WM_event_add_notifier(const bContext *C, unsigned int type, void *reference)
{
ARegion *ar;
wmWindowManager *wm = CTX_wm_manager(C);
wmNotifier *note;
@@ -196,10 +195,6 @@ void WM_event_add_notifier(const bContext *C, unsigned int type, void *reference
note->window = CTX_wm_window(C);
ar = CTX_wm_region(C);
if (ar)
note->swinid = ar->swinid;
note->category = type & NOTE_CATEGORY;
note->data = type & NOTE_DATA;
note->subtype = type & NOTE_SUBTYPE;
@@ -1209,8 +1204,8 @@ static int wm_operator_invoke(
}
if ((G.debug & G_DEBUG_HANDLERS) && ((event == NULL) || (event->type != MOUSEMOVE))) {
printf("%s: handle evt %d win %d op %s\n",
__func__, event ? event->type : 0, CTX_wm_screen(C)->subwinactive, ot->idname);
printf("%s: handle evt %d region %p op %s\n",
__func__, event ? event->type : 0, CTX_wm_screen(C)->active_region, ot->idname);
}
if (op->type->invoke && event) {
@@ -2769,7 +2764,7 @@ void wm_event_do_handlers(bContext *C)
/* Note: setting subwin active should be done here, after modal handlers have been done */
if (event->type == MOUSEMOVE) {
/* state variables in screen, cursors. Also used in wm_draw.c, fails for modal handlers though */
ED_screen_set_subwinactive(C, event);
ED_screen_set_active_region(C, event);
/* for regions having custom cursors */
wm_paintcursor_test(C, event);
}