Re: [AD] GTK requirement

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


On Wed, 26 Dec 2012 18:36:25 -0700, Trent Gamblin <nooskewl@xxxxxxxxxx> wrote:
> On 2012-12-26, at 6:21 PM, Peter Wang <novalazy@xxxxxxxxxx> wrote:
> > Ok, I did something like what I suggested.
> 
> I noticed. I was going to work on this over Christmas but saw your commits before I started. Thanks.
> 
> > Sorry if I broke the Raspberry Pi port in the process.
> > 
> > As I wrote, I'm still not too happy that a program which only wants
> > message boxes will be forced to go through GTK for input (assuming we
> > can get the GTK paths working as well as the normal Xlib paths in the
> > future).
> > 
> > I'm thinking we should do as somebody suggested, and add a display flag
> > like ALLEGRO_GTK or ALLEGRO_GTKGLEXT.  You would need to set that before
> > creating the display if you want menus.
> 
> I tried just using the Xlib drivers along with GTK at first but it
> didn't work. It's either not possible or I'm too new to X programming
> to figure it out.

I'll experiment with GtkSocket, maybe in the next few days.
I previously added support for the XEmbed protocol, meaning an Allegro
window can already be swallowed by a GtkSocket widget.  So we have the
option of using GTK to create a window containing the GtkSocket, then
swallowing the GLX window which we create ourselves, and which receives
X input events as before.  We'd go via GTK to deal with the outer
window, e.g. window resizing, setting the title bar, etc.

> I know that's not what you meant though. I agree,
> it's not necessary to have input go through GTK for messageboxes. I
> think the only thing that needs to be done is a gtk_init? So display
> flags would work. We just would do an extra gtk_init, outside of the
> gtk thread if ALLEGRO_GTK wasn't set.

Yeah, adding the flag would be easy.  gtk_init already exists in
_al_gtk_ensure_thread, too.

Peter




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