Re: [AD] More X Mode Setting |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On 2011-01-14, Thomas Fjellstrom <tfjellstrom@xxxxxxxxxx> wrote:
>
> > What is the usual behaviour anyway? If you have a dual monitor setup,
> > and you run a game with uses only one screen, should the game grab the
> > mouse? I suppose it depends on the game.
>
> I think normally that would be the case. But there should be a way for the
> user to ungrab the mouse.
>
> > If an API, is this all we need?
> >
> > bool al_grab_mouse(ALLEGRO_DISPLAY *display, bool onoff);
>
> That would help.
>
> >
> > At any rate, we should leave some control in the hands of the user,
> > via the config file and/or a special key which toggles mouse grabbing
> > on all Allegro windows (ScrollLock?)
>
> I'm not sure we should force the issue, or if we do, make it disable-able, or
> make the key configurable.
Ok, should be doable.
> > > Oh, the new xrandr code gets a little "creative" with the _AL_VECTOR
> > > type, if you don't mind that, we can leave it, or possibly add a
> > > _al_vector_append_array(_AL_VECTOR *vec, int num, TYPE *arr) type
> > > function to make the query code a little less creative.
> >
> > Yes, please do that.
>
> kk. the name ok? or do you have a better suggestion?
It's fine.
> Also, have you had time to look at the lazy init stuff? It doesn't seem to be
> necessary on any of my machines to delay the mmon init past al_create_display.
> Also I'm not sure we should cater to horrible X bugs like that too much.
> Theres already too many X/WM bugs we're hacking around as it is. That said, I
> feel a little lame for not being able to come up with a decent way to keep the
> full lazy init in tact. Turns out after making sure windows are placed
> according to how the api wants windows placed, respecting the
> al_set_new_display_adapter, and al_set_new_window_position etc, we kind of
> need to know what monitor we have, and where to place things.
I only looked at it briefly, but it seems we can still do lazy init for
the majority of programs, which simply open a window and don't care
where it is placed. I was planning to try it after you commit.
> There is one small possibility, if we check that new display adapter is -1, we
> can potentially delay mmon init till the window is moved (so we can track
> which monitor its on)
What's the reason for tracking which monitor a window is on?
Sorry if it's obvious.
Peter