Re: [AD] Peter's patches

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


Peter Wang wrote :
> 
> I can only guess, but I think, in the code below, Glide does not
> attach itself to any X window.  I'm assuming it worked before
> because you had input focus on the Allegro window, which used to pop
> up in the system driver.  With my patch, the window only pops up
> during `set_gfx_mode', so call that and make sure input focus is on
> the window.
> 
Yes, you are right ! Your patch is not buggy :-) I could reproduce this
behaviour with the simple program below :

#include <allegro.h>

int main() {
   allegro_init();
   install_keyboard();
   
//   set_gfx_mode(GFX_XWINDOWS, 320, 200, 0, 0);

   while (!keypressed()) {
   }
}
END_OF_MAIN();

If you uncomment the 'set_gfx_mode' this example ends when you press a
key otherwise it does not. I have learnt this is a standard behaviour
for windowed modes but I think this should be documented (at least in
the FAQ : for instance "Why my keyboard doesn't work under X-windows
?").

	Bertrand.



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