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:
>
> re-factor working now, at least on my laptop, attached the new patch.
>
> I'll remove the old xrandr code in a second commit, just to make sure the code
> is around some place. right now its just #if 0'ed out.
>
> All of the new xrandr code lives in src/x/xrandr.c now, split out from
> src/x/xfullscreen.c, its considerably cleaner, makes it a lot easier to work
> with and improve. And it works at least as well as the old code did, if not
> better (it will for sure once I add the logic to detect monitor relationships
> and change monitor origins, to fix mouse behavior with multiple monitors).
>
> We also need to figure out a way to fix the mouse grabbing. The way it was,
> totally broke multi monitor. The way it is now, breaks single monitor full
> screen (it just doesn't grab the mouse at all right now).
FWIW: randr/single monitor - cursor confined as expected.
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.
If an API, is this all we need?
bool al_grab_mouse(ALLEGRO_DISPLAY *display, bool onoff);
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?)
>
> 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.
Peter