Re: [AD] More X Mode Setting |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On 2011-01-12, Thomas Fjellstrom <tfjellstrom@xxxxxxxxxx> wrote:
> On January 12, 2011, Peter Wang wrote:
> > On 2011-01-12, Thomas Fjellstrom <tfjellstrom@xxxxxxxxxx> wrote:
> > > I'm in the middle of refactoring the XRandR code. Not entirely sure when
> > > it'll be done (soonish), but it is necessary.
> > >
> > > Seems XRandR doesn't do anything without you telling it, and doesn't have
> > > any notion about what relation one monitor is to the next, ie: theres no
> > > LeftOf or Above type flags, so we have to calculate the right monitor
> > > origins for each set of modes, to make sure multiple full screen
> > > displays are right next to each other. And re-querying Xrandr can be a
> > > tad expensive so I've added in the code to handle XRR notify events. But
> > > it turns out it'll be more efficient to store our own custom XRR
> > > structures rather than pointing to XRROutput structures, this way we'll
> > > be able to detect what exactly changed (the change events in XRR are
> > > rather coarse, just tells you that a CRTC or Output changed, and not
> > > what inside changed).
> >
> > I don't know if it would help you, but reconfiguring monitor setups is
> > not something people do very often (if ever), so efficiency isn't a high
> > priority.
>
> True, but the XRandR query takes about half a second on my laptop, and we'd
> probably have to re do it every time we get an event. I don't think thats
> something we want to do. As we get an event for every change we make
> ourselves. So 2-4 events at least just for ex_dualies.
>
> One thing I'm somewhat disappointed about is that all that work you did to
> make mmon display init lazy, has been made mostly redundant. Since now
> xdpy_create_display needs to init the mmon code. If we had a way to tell
> allegro to "ignore" multi monitor, we could make it so regular windowed
> allegro apps don't init it, but as of right now, we need to init the mmon code
> just to know if we want to init it. Its pretty silly.
Hmm, that could be rather bad. I added that lazy init stuff because
(sometimes, not sure when) it would cause monitors to blank when probed,
or add a noticeable delay when starting a program.
Can you post a patch at some point so I could have a look?
Doesn't matter if it's incomplete.
Peter