2.5
authorTon Roosendaal <ton@blender.org>
Thu, 18 Dec 2008 14:53:39 +0000 (14:53 +0000)
committerTon Roosendaal <ton@blender.org>
Thu, 18 Dec 2008 14:53:39 +0000 (14:53 +0000)
- 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.

source/blender/editors/screen/screen_edit.c
source/blender/windowmanager/intern/wm_event_system.c

index b88290bd64ebd8f28d6fbc68575b573343fcb381..6f1b0558851f423dc5f7bf3b1dfa4d55a1fd175e 100644 (file)
@@ -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);
 }
 
index 72ad5d8c4ace1f670fcea38868206bf6e4fb1ff3..e5d5f7ebc9caa41286682dc26e1cd13d1d7771ca 100644 (file)
@@ -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 */