From 023ea476fd7beef702859326f55a698879ec2a5a Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Fri, 13 Feb 2009 13:55:57 +0000 Subject: [PATCH] 2.5 Bugfix: menus in "screen space" could go wrong because the code accidentally used window->winid instead of screen->mainwin id. (the first is window id, the 2nd wm subwindow id. On start both are one, which made it not appear immediately). --- source/blender/editors/interface/interface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index 8f96732a911..66d9653bdd0 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -1610,8 +1610,8 @@ uiBlock *uiBeginBlock(const bContext *C, ARegion *region, char *name, short dt, /* no subwindow created yet, for menus for example, so we * use the main window instead, since buttons are created * there anyway */ - wm_subwindow_getmatrix(window, window->winid, block->winmat); - wm_subwindow_getsize(window, window->winid, &getsizex, &getsizey); + wm_subwindow_getmatrix(window, window->screen->mainwin, block->winmat); + wm_subwindow_getsize(window, window->screen->mainwin, &getsizex, &getsizey); block->aspect= 2.0/fabs(getsizex*block->winmat[0][0]); block->auto_open= 2;