Re: [AD] mouse focus @ create Window time bug

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


AJ wrote:
http://www.allegro.cc/forums/view_thread.php?_id=476898

this thread on a.cc seems to have found a fix for the mouse focus at createWindow time issue.

the problem is the mouse & keyb does not work if the window has not got the focus when the CreateWindow() is called.




/docs/src/win/wkeyb.c  line 553:
hr = IDirectInputDevice_SetCooperativeLevel(key_dinput_device, allegro_wnd, DISCL_FOREGROUND | DISCL_NONEXCLUSIVE);

passes the  allego_wnd  which gets set by  create_directx_window()

even the /examples/exmouse.c attempts to init_keyb before it creates the window. so the allegro_wnd is probably NULL when that
IDirectInputDevice_SetCooperativeLevel() occurs.

whether this has anything to do with this focus bug, i have no idea.


aj.





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/