Re: [AD] X window creation

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


Shawn Hargreaves <shawn@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.
> 
> The question is, does this break anything? It seems like a harmless 
> alteration to me, but I thought I'd better check with the people who know 
> more about that code :-)

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 ();

The only reason for having window created in allegro_init was to get
input from keyboard and mouse even when graphics mode is not set.  If
your code handles that too, or you think that getting keyboard and
mouse input without setting graphics mode is not necessary (I think it
is not very useful in Allegro, which is mostly graphics library), then
this change should be fine.

-- 
Michael Bukin



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