| Opening multiple display connections to the same host, server, and
screen: It's legal but not a good idea.
If the application is toolkit-based, then main loop will dispatch on
events to each display connection. There's no reason to do this in
preference to one display connection.
If the application is not toolkit-based, then the application assumes
responsibility for read the input queue from each display connection.
I've seen bizzare application behavior where the application doesn't
read each input event queue in a timely manner, ie the mouse "works" in
one window but not the other. Keyboard input is ignored until a button
is pushed, and then the previously entered keystrokes are processed...
The programmer thought that this would create "priority" for some
windows in the application. I had to educate him that the user
probably expects his input to be processed in the order it was entered.
|
| Two connections to the same display is one technique for handling
UNIX-style signals (interrupts). One display is used for normal
requests, the other is used within signal handlers. As mentioned in .1,
you do have to be very careful to properly process events and errors
on both connections.
Ken
|