Re: [AD] X window creation

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


Michael Bukin <M.A.Bukin@xxxxxxxxxx> writes:
>> I made a small change to the way the X window is created, removing 
>> the call to _xwin_create_window() from xsystem.c, and instead calling 
>> it from the start of _xwin_private_create_screen() and 
>> _xdga_private_create_screen() if _xwin.window == None.
> 
> I don't know the details of this change, but will the following
> program work?
> 
> #include <allegro.h>
> 
> int
> main (void)
> {
>   allegro_init ();
>   install_keyboard ();
>   readkey ();
>   return 0;
> }
> END_OF_MAIN ();

No, that won't be able to read the input any more, but I think it is ok: 
as you say this isn't such a useful thing to support, and it doesn't work 
in the Windows version either.

My main reason for doing this change was as a first step towards 
supporting a way of attaching Allegro drawing onto an existing window: if 
we are going to add functions for that at some point, it is important to 
be able to initialise the system without creating a window automatically, 
so you later have the option of either calling set_gfx_mode() or 
attaching it to an existing window(s) of your own.



-- 
Shawn Hargreaves - shawn@xxxxxxxxxx - http://www.talula.demon.co.uk/
"A binary is barely software: it's more like hardware on a floppy disk."



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