diff options
author | Ton Roosendaal <ton@blender.org> | 2008-12-03 16:44:16 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2008-12-03 16:44:16 +0300 |
commit | 167ac3606b0ac42d2e005cb6e80cead0bf140f30 (patch) | |
tree | 0cd99e160bce021babff84c81eb50c2a625f0002 /source/blender/editors/interface/interface_regions.c | |
parent | d8ed4c389c750f0513a7024fa5dadeb28c05749b (diff) |
2.5
- Made view2d manipulations redraw on area level
- simplified call to send Notifiers:
WM_event_add_notifier(bContext *C, int type, int value, void *data)
This brings back more control to WM, no context messing within
operators. :) Handlers that execute operators will be responsible
for delivering correct contextes.
In general: should lead to making context not exposed, but only
readable via some callbacks.
Diffstat (limited to 'source/blender/editors/interface/interface_regions.c')
-rw-r--r-- | source/blender/editors/interface/interface_regions.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c index 8f2f933a946..ba7add6c875 100644 --- a/source/blender/editors/interface/interface_regions.c +++ b/source/blender/editors/interface/interface_regions.c @@ -332,8 +332,8 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but) ar->winrct.ymax= y2; /* notify change and redraw */ - WM_event_add_notifier(C->wm, C->window, 0, WM_NOTE_SCREEN_CHANGED, 0, NULL); - WM_event_add_notifier(C->wm, C->window, 0, WM_NOTE_WINDOW_REDRAW, 0, NULL); + WM_event_add_notifier(C, WM_NOTE_SCREEN_CHANGED, 0, NULL); + WM_event_add_notifier(C, WM_NOTE_WINDOW_REDRAW, 0, NULL); return ar; } @@ -342,8 +342,8 @@ void ui_tooltip_free(bContext *C, ARegion *ar) { ui_remove_temporary_region(C, C->window->screen, ar); - WM_event_add_notifier(C->wm, C->window, 0, WM_NOTE_SCREEN_CHANGED, 0, NULL); - WM_event_add_notifier(C->wm, C->window, 0, WM_NOTE_WINDOW_REDRAW, 0, NULL); + WM_event_add_notifier(C, WM_NOTE_SCREEN_CHANGED, 0, NULL); + WM_event_add_notifier(C, WM_NOTE_WINDOW_REDRAW, 0, NULL); } /************************* Creating Menu Blocks **********************/ @@ -650,8 +650,8 @@ uiMenuBlockHandle *ui_menu_block_create(bContext *C, ARegion *butregion, uiBut * block->flag |= UI_BLOCK_LOOP|UI_BLOCK_MOVEMOUSE_QUIT; /* notify change and redraw */ - WM_event_add_notifier(C->wm, C->window, 0, WM_NOTE_SCREEN_CHANGED, 0, NULL); - WM_event_add_notifier(C->wm, C->window, 0, WM_NOTE_WINDOW_REDRAW, 0, NULL); + WM_event_add_notifier(C, WM_NOTE_SCREEN_CHANGED, 0, NULL); + WM_event_add_notifier(C, WM_NOTE_WINDOW_REDRAW, 0, NULL); SWAP(ARegion*, C->region, ar); /* XXX 2.50 bad context swapping */ WM_operator_invoke(C, WM_operatortype_find("ED_UI_OT_menu_block_handle"), NULL); @@ -665,8 +665,8 @@ void ui_menu_block_free(bContext *C, uiMenuBlockHandle *handle) ui_remove_temporary_region(C, C->window->screen, handle->region); MEM_freeN(handle); - WM_event_add_notifier(C->wm, C->window, 0, WM_NOTE_SCREEN_CHANGED, 0, NULL); - WM_event_add_notifier(C->wm, C->window, 0, WM_NOTE_WINDOW_REDRAW, 0, NULL); + WM_event_add_notifier(C, WM_NOTE_SCREEN_CHANGED, 0, NULL); + WM_event_add_notifier(C, WM_NOTE_WINDOW_REDRAW, 0, NULL); } /***************************** Menu Button ***************************/ |