[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MiNT] Workaround for the XaAES-iconify-menubar-bug.



Hi,

To whom it may concern - it seems the bug related to menubars in windows in combination with iconify can be dealt with as follows:

wind_close(w->handle);

wind_set_grect(w->handle, WF_UNICONIFY, &msg[4]);
wind_get_grect(w->handle, WF_WORKXYWH, &w->work);

wind_delete(w->handle);
w->handle = wind_create_grect(w->parts, &w->work);


wind_set(w->handle, WF_NAME, ((UINT32)w->title) >> 16, ((UINT32)w->title) & 0xffff, 0, 0);


wind_set(w->handle, WF_OPTS, 1, WO0_WCOWORK, 0, 0); /* work with work area coordinates */
wind_set(w->handle, WF_WHEEL, 1, 0, 0, 0); /* generate WM_WHEEL */

if(w->menu_tree)
wind_set(w->handle, WF_MENU, (((UINT32)w->menu_tree)>>16), ((UINT32)w->menu_tree) & 0xffff, 0, 0);

wind_open_grect(w->handle, &w->work);

I don't know how kosher all this is, but I haven't noticed any side effects so far. Naturally it'll only work if you have some kind extraction for the window handling, like I do. The remainder of the project have no clue as to what a window handle is, so I'm free to change it whenever I want to.

-- PeP