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).
This commit is contained in:
2009-02-13 13:55:57 +00:00
parent 1d5115c251
commit 023ea476fd

View File

@@ -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;