Re: [AD] multiple windows |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Thursday 17 August 2006 05:31, Elias Pschernig wrote:
> This means, the
> system driver should call XOpenDisplay, and all the display drivers
> should re-use the connection.
This doesn't sound proper. IMO, an AL_DISPLAY should invoke it's own
connection to the server (after all, if we're mapping AL_DISPLAY to an X11
Display object (and the equivilant for other systems), you can't have
multiple AL_DISPLAYs sharing the same connection. Each window needs its own
Display handle, unless you're doing something like sub-windows, but that's a
whole nother kettle of fish.
So, I pretty much see it as:
Window Manager
/ \
X11 Event X11 Event (WM sends events)
| |
Display Display (our display code handles them)
| |
Queue Queue (event is pushed onto the per-display queue)
| |
Event Event (user retreives events)
From there, it'll be a lot easier for a user to push the seperate events into
their own global event queue, than it would be to seperate a single event
queue into multiple queues.. especially if they have an arbitrary amount of
windows/displays open, where it becomes much more difficult.
> And I have no idea about joystick.. I'd have said it should always
> affect the window with keyboard focus. But I never had a joystick, so
> can't really say much how the OS/WM (if at all) handles it.
AFAIK, in X, the WM doesn't handle the joystick like it does the keyboard or
mouse. You have to open the device yourself and watch for events. But at the
same time, I can't see needing joystick events seperated per window, unlike
mouse or keyboard events. You don't really use a joystick to interact with
the system, you use it to interact with games.