Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/screen/area.c
| Show First 20 Lines • Show All 510 Lines • ▼ Show 20 Lines | void ED_region_do_draw(bContext *C, ARegion *ar) | ||||
| /* Set viewport, scissor, ortho and ar->drawrct. */ | /* Set viewport, scissor, ortho and ar->drawrct. */ | ||||
| wmPartialViewport(&ar->drawrct, &ar->winrct, &ar->drawrct); | wmPartialViewport(&ar->drawrct, &ar->winrct, &ar->drawrct); | ||||
| wmOrtho2_region_pixelspace(ar); | wmOrtho2_region_pixelspace(ar); | ||||
| UI_SetTheme(sa ? sa->spacetype : 0, at->regionid); | UI_SetTheme(sa ? sa->spacetype : 0, at->regionid); | ||||
| #ifdef WITH_IM_OVERTHESPOT | |||||
| /* input method might need to be activate/deactivate for unusual reason | |||||
| * (e.g. change space type in active region, change screen, toggle fullscreen, etc.) */ | |||||
| if (CTX_wm_screen(C)->active_region == ar) { | |||||
| if (!(at->im_begin && at->im_begin(C, ar))) | |||||
| WM_window_IM_end(win); | |||||
| } | |||||
| #endif | |||||
| if (sa && area_is_pseudo_minimized(sa)) { | if (sa && area_is_pseudo_minimized(sa)) { | ||||
| UI_ThemeClearColor(TH_EDITOR_OUTLINE); | UI_ThemeClearColor(TH_EDITOR_OUTLINE); | ||||
| glClear(GL_COLOR_BUFFER_BIT); | glClear(GL_COLOR_BUFFER_BIT); | ||||
| return; | return; | ||||
| } | } | ||||
| /* optional header info instead? */ | /* optional header info instead? */ | ||||
| else if (ar->headerstr) { | else if (ar->headerstr) { | ||||
| region_draw_status_text(sa, ar); | region_draw_status_text(sa, ar); | ||||
| ▲ Show 20 Lines • Show All 65 Lines • ▼ Show 20 Lines | if (ELEM(ar->regiontype, RGN_TYPE_WINDOW, RGN_TYPE_CHANNELS, RGN_TYPE_UI, RGN_TYPE_TOOLS)) { | ||||
| /* All properties for this space type. */ | /* All properties for this space type. */ | ||||
| WM_msg_subscribe_rna(mbus, &ptr, NULL, &msg_sub_value_region_tag_redraw, __func__); | WM_msg_subscribe_rna(mbus, &ptr, NULL, &msg_sub_value_region_tag_redraw, __func__); | ||||
| } | } | ||||
| ED_region_message_subscribe(C, workspace, scene, screen, sa, ar, mbus); | ED_region_message_subscribe(C, workspace, scene, screen, sa, ar, mbus); | ||||
| } | } | ||||
| } | } | ||||
| #ifdef WITH_IM_OVERTHESPOT | |||||
| bool ED_region_generic_im_begin(const bContext *C, ARegion *UNUSED(ar)) | |||||
| { | |||||
| WM_window_IM_begin(CTX_wm_window(C)); | |||||
| return true; | |||||
| } | |||||
| #endif | |||||
| /* ********************************** | /* ********************************** | ||||
| * maybe silly, but let's try for now | * maybe silly, but let's try for now | ||||
| * to keep these tags protected | * to keep these tags protected | ||||
| * ********************************** */ | * ********************************** */ | ||||
| void ED_region_tag_redraw(ARegion *ar) | void ED_region_tag_redraw(ARegion *ar) | ||||
| { | { | ||||
| /* don't tag redraw while drawing, it shouldn't happen normally | /* don't tag redraw while drawing, it shouldn't happen normally | ||||
| ▲ Show 20 Lines • Show All 2,507 Lines • Show Last 20 Lines | |||||