diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-09-24 03:31:42 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-09-24 03:31:42 +0400 |
commit | 74828cc609cd7071a4b3c24d3ad94ff7eccf54cb (patch) | |
tree | 1e0b0df627d11aa90fb3afe4fb631c2ce40ad8cf | |
parent | fb591ea9131548bdb9b29c4e353eba8ea5deb1bb (diff) |
Fix #36783: click outside splash screen to close it would not highlight the
button under the mouse, and so clicking the button failed without first
moving the mouse. Similar issues could happen with popups and switching
windows.
The problem is that a notifier was being used to deactivate possible other
activated buttons, but as notifiers are delayed it could undo the correct
activation too. If anyone notices hanging tooltips or other issues after this
fix, please report them.
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 2 | ||||
-rw-r--r-- | source/blender/editors/screen/screen_edit.c | 8 | ||||
-rw-r--r-- | source/blender/windowmanager/WM_types.h | 1 |
3 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 4a6d14d7004..20e03e7dcd5 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -7728,6 +7728,8 @@ static int ui_handler_popup(bContext *C, const wmEvent *event, void *userdata) } else if (temp.cancel_func) temp.cancel_func(C, temp.popup_arg); + + WM_event_add_mousemove(C); } else { /* re-enable tooltips */ diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index 10c2ecd6fd9..356db174c2f 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -1009,8 +1009,6 @@ void ED_screen_do_listen(bContext *C, wmNotifier *note) win->screen->do_draw = TRUE; break; case NC_SCREEN: - if (note->data == ND_SUBWINACTIVE) - uiFreeActiveButtons(C, win->screen); if (note->action == NA_EDITED) win->screen->do_draw = win->screen->do_refresh = TRUE; break; @@ -1335,7 +1333,11 @@ void ED_screen_set_subwinactive(bContext *C, wmEvent *event) /* notifier invokes freeing the buttons... causing a bit too much redraws */ if (oldswin != scr->subwinactive) { region_cursor_set(win, scr->subwinactive, TRUE); - WM_event_add_notifier(C, NC_SCREEN | ND_SUBWINACTIVE, scr); + + /* this used to be a notifier, but needs to be done immediate + * because it can undo setting the right button as active due + * to delayed notifier handling */ + uiFreeActiveButtons(C, win->screen); } else region_cursor_set(win, scr->subwinactive, FALSE); diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h index e6b6df11d7d..ac9af832671 100644 --- a/source/blender/windowmanager/WM_types.h +++ b/source/blender/windowmanager/WM_types.h @@ -261,7 +261,6 @@ typedef struct wmNotifier { #define ND_EDITOR_CHANGED (6<<16) /*sent to new editors after switching to them*/ #define ND_SCREENSET (7<<16) #define ND_SKETCH (8<<16) -#define ND_SUBWINACTIVE (9<<16) /* NC_SCENE Scene */ #define ND_SCENEBROWSE (1<<16) |