[AD] Some thoughts about multi-window applications

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


Over the past few weeks I've been playing a bit with multiple windows in Allegro 5. For the most part, everything works great, but there are a few annoyances that I ran across:

1. When getting mouse (or keyboard) input the event struct does not contain a pointer to the active window (or if it does, that is not documented or clear from the examples). Not a problem, since you can keep track of switch in/out events yourself, but it is annoying and it would be convenient to have.

2. Related question: I'm working under the assumption that the last created window has input focus. Is this true on all platforms (it would make sense)?

3. Not unimportant: I place the windows such that they don't overlap. To do this, I derive from the position of the first window and move the new window position by the window size and a little extra to account for window decorations. However, it is guananteed that the space taken up by decorations will be different across different platforms. Should we add a function that will return the window dimensions on the desktop for this reason? Does this functionality exist on all platforms?

4. al_toggle_window_frame does nothing on OS X. I'll have to check, but you may not be able to change this after the window was created. If that is so, maybe this function should return true or false, depending on whether the call was succesful or not (not that it would matter too much - what are you going to do if it fails, after all?)

Evert




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