diff options
author | Ton Roosendaal <ton@blender.org> | 2008-12-02 21:49:58 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2008-12-02 21:49:58 +0300 |
commit | d27c9f9d76752bffdcdf60812ee05f48482bccfc (patch) | |
tree | 239756a158f8610327870ccc02bb45cd0019b9bf /source/blender/windowmanager/intern/wm_init_exit.c | |
parent | 6a6b38683226f606880616d0ee985ffc8d7617f7 (diff) |
2.5
- after closing button (having used it), it sends empty mousemove for
invoking new modal handler on same button. Don't know better solution
for now, at least this way WM handles everything. :)
- experiment: moved button handlers to area level, that way it respects
handlers on higher hierarchical level, like moving area edges.
Als interesting is that you can have a button active (texteditor) and
use a similar button in other area.
This can also be done on region level even.
On todo: proper notifier events for redraw! Don't want all areas to draw
on simple refreshes
Diffstat (limited to 'source/blender/windowmanager/intern/wm_init_exit.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_init_exit.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c index fb8101168e2..3346f0607a9 100644 --- a/source/blender/windowmanager/intern/wm_init_exit.c +++ b/source/blender/windowmanager/intern/wm_init_exit.c @@ -164,6 +164,7 @@ void WM_exit(bContext *C) /* modal handlers are on window level freed, others too? */ if(C && C->wm) { for(win= C->wm->windows.first; win; win= win->next) { + ScrArea *sa; ARegion *ar; C->window= win; /* needed by operator close callbacks */ @@ -171,6 +172,12 @@ void WM_exit(bContext *C) for(ar= win->screen->regionbase.first; ar; ar= ar->next) WM_event_remove_handlers(C, &ar->handlers); + + for(sa= win->screen->areabase.first; sa; sa= sa->next) { + WM_event_remove_handlers(C, &sa->handlers); + for(ar= sa->regionbase.first; ar; ar= ar->next) + WM_event_remove_handlers(C, &ar->handlers); + } } } wm_operatortype_free(); |