diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-10-25 06:57:55 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-10-25 06:57:55 +0400 |
commit | 95b8a64889b31bdbb50c02e4c5825001c8a6432b (patch) | |
tree | 9abcdec01ea12eab964d3628055c241947f5d1d6 /source/blender | |
parent | 1298357581ac4e1c4221ce723d5ad0db9721aa4b (diff) |
fix [#32938] The Splash Screen doesn't show up correctly .....
applying window clipping to the splash on startup gave strange/annoying problems.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/include/UI_interface.h | 2 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_regions.c | 6 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 6 |
3 files changed, 11 insertions, 3 deletions
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index d162b493803..ed4b4ae027f 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -108,7 +108,7 @@ typedef struct uiLayout uiLayout; #define UI_BLOCK_REDRAW 2 #define UI_BLOCK_SEARCH_MENU 4 #define UI_BLOCK_NUMSELECT 8 -/*#define UI_BLOCK_ENTER_OK 16*/ /*UNUSED*/ +#define UI_BLOCK_NO_WIN_CLIP 16 /* don't apply window clipping */ /* was UI_BLOCK_ENTER_OK */ #define UI_BLOCK_CLIPBOTTOM 32 #define UI_BLOCK_CLIPTOP 64 #define UI_BLOCK_MOVEMOUSE_QUIT 128 diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c index df680f4f875..94dccd61c3a 100644 --- a/source/blender/editors/interface/interface_regions.c +++ b/source/blender/editors/interface/interface_regions.c @@ -1548,7 +1548,11 @@ static void ui_block_region_draw(const bContext *C, ARegion *ar) static void ui_popup_block_clip(wmWindow *window, uiBlock *block) { int winx, winy; - + + if (block->flag & UI_BLOCK_NO_WIN_CLIP) { + return; + } + wm_window_get_size(window, &winx, &winy); if (block->rect.xmin < MENU_SHADOW_SIDE) diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index b041a790581..9a414f7ce1d 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -1320,7 +1320,11 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *UNUSED(ar #endif /* WITH_BUILDINFO */ block = uiBeginBlock(C, ar, "_popup", UI_EMBOSS); - uiBlockSetFlag(block, UI_BLOCK_KEEP_OPEN); + + /* note on UI_BLOCK_NO_WIN_CLIP, the window size is not always synchronized + * with the OS when the splash shows, window clipping in this case gives + * ugly results and clipping the splash isn't useful anyway, just disable it [#32938] */ + uiBlockSetFlag(block, UI_BLOCK_KEEP_OPEN | UI_BLOCK_NO_WIN_CLIP); but = uiDefBut(block, BUT_IMAGE, 0, "", 0, 10, 501, 282, ibuf, 0.0, 0.0, 0, 0, ""); /* button owns the imbuf now */ uiButSetFunc(but, wm_block_splash_close, block, NULL); |