Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-02-25 01:19:31 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-02-25 01:19:31 +0300
commit44862110dec81a45fb9185ef45007e6e5c18cb89 (patch)
tree86172e91139096334660288496de44cd8facbce5 /source/blender/editors
parentf61f26b033fd7d9c8b8bbf8b77cb24ef902f5ba8 (diff)
WM: move cursor refresh tag to the window
Avoids having to check the current area is NULL.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/interface/interface_region_popup.c4
-rw-r--r--source/blender/editors/screen/screen_edit.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/interface/interface_region_popup.c b/source/blender/editors/interface/interface_region_popup.c
index b72cc7296db..b509f5e352b 100644
--- a/source/blender/editors/interface/interface_region_popup.c
+++ b/source/blender/editors/interface/interface_region_popup.c
@@ -554,8 +554,8 @@ static void ui_popup_block_remove(bContext *C, uiPopupBlockHandle *handle)
CTX_wm_region_set(C, ctx_ar);
/* reset to region cursor (only if there's not another menu open) */
- if ((ctx_sa != NULL) && (BLI_listbase_is_empty(&sc->regionbase))) {
- ctx_sa->flag |= AREA_FLAG_CURSOR_UPDATE;
+ if (BLI_listbase_is_empty(&sc->regionbase)) {
+ win->tag_cursor_refresh = true;
}
if (handle->scrolltimer) {
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c
index 23a6704a617..1fd3f258e6c 100644
--- a/source/blender/editors/screen/screen_edit.c
+++ b/source/blender/editors/screen/screen_edit.c
@@ -401,8 +401,8 @@ int screen_area_join(bContext *C, bScreen *scr, ScrArea *sa1, ScrArea *sa2)
static void region_cursor_set_ex(wmWindow *win, ScrArea *sa, ARegion *ar, bool swin_changed)
{
BLI_assert(WM_window_get_active_screen(win)->active_region == ar);
- if (sa->flag & AREA_FLAG_CURSOR_UPDATE || swin_changed || (ar->type && ar->type->event_cursor)) {
- sa->flag &= ~AREA_FLAG_CURSOR_UPDATE;
+ if (win->tag_cursor_refresh || swin_changed || (ar->type && ar->type->event_cursor)) {
+ win->tag_cursor_refresh = false;
ED_region_cursor_set(win, sa, ar);
}
}