diff options
author | Ton Roosendaal <ton@blender.org> | 2008-12-18 17:53:39 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2008-12-18 17:53:39 +0300 |
commit | e8e903cd534e8c644dd8e2ceeadab0236fa94f00 (patch) | |
tree | 76f503b23c171716357da48f2f9d191de18cbe72 | |
parent | 9ca17605254fdb61eba4c5f82693975988aec803 (diff) |
2.5
- WM subwindows now get freed on every ED_region_exit(). Was not
a leak, but it's cleaner this way (and saves some kilobytes!).
- fixed debug print for operators (on blender -d) to print correct
subwindow id.
-rw-r--r-- | source/blender/editors/screen/screen_edit.c | 4 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_system.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index b88290bd64e..6f1b0558851 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -1020,6 +1020,10 @@ void ED_region_exit(bContext *C, ARegion *ar) CTX_wm_region_set(C, ar); WM_event_remove_handlers(C, &ar->handlers); + if(ar->swinid) + wm_subwindow_close(CTX_wm_window(C), ar->swinid); + ar->swinid= 0; + CTX_wm_region_set(C, prevar); } diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 72ad5d8c4ac..e5d5f7ebc9c 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -568,7 +568,7 @@ static int wm_handlers_do(bContext *C, wmEvent *event, ListBase *handlers) for(kmi= handler->keymap->first; kmi; kmi= kmi->next) { if(wm_eventmatch(event, kmi)) { if((G.f & G_DEBUG) && event->type!=MOUSEMOVE) - printf("handle evt %d win %d op %s\n", event->type, CTX_wm_window(C)->winid, kmi->idname); + printf("handle evt %d win %d op %s\n", event->type, CTX_wm_screen(C)->subwinactive, kmi->idname); event->keymap_idname= kmi->idname; /* weak, but allows interactive callback to not use rawkey */ |