diff options
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 3 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_system.c | 16 |
2 files changed, 10 insertions, 9 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 7c3cb006225..91380d20f41 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -4608,7 +4608,8 @@ void uiFreeActiveButtons(const bContext *C, bScreen *screen) uiHandleButtonData *data= but->active; if(data->menu==NULL && data->searchbox==NULL) - ui_button_active_free(C, but); + if(data->state == BUTTON_STATE_HIGHLIGHT) + ui_button_active_free(C, but); } } } diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index ae61b3dd98f..85d399519ad 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -1738,14 +1738,6 @@ void wm_event_do_handlers(bContext *C) CTX_wm_area_set(C, area_event_inside(C, event->x, event->y)); CTX_wm_region_set(C, region_event_inside(C, event->x, event->y)); - /* XXX to solve, here screen handlers? */ - if(event->type==MOUSEMOVE) { - /* state variables in screen, cursors, also used in wm_draw.c */ - ED_screen_set_subwinactive(C, event); - /* for regions having custom cursors */ - wm_paintcursor_test(C, event); - } - /* MVC demands to not draw in event handlers... but we need to leave it for ogl selecting etc */ wm_window_make_drawable(C, win); @@ -1767,6 +1759,14 @@ void wm_event_do_handlers(bContext *C) ARegion *ar; int doit= 0; + /* 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); + /* for regions having custom cursors */ + wm_paintcursor_test(C, event); + } + for(sa= win->screen->areabase.first; sa; sa= sa->next) { if(wm_event_inside_i(event, &sa->totrct)) { CTX_wm_area_set(C, sa); |