Re: [AD] Adding a preferred window adapter parameter for going fullscreen window

2016-12-01 Thread SiegeLord

So what would the preferred course of action be then?

We can allow a user to set a preferred full screen window adapter, or we
can choose to go full screen window on the monitor that the window is
currently over. Which would be prefereable? Perhaps both?


I think both sound good, but at least the second would make things a lot 
better already. I'd start with the second one.



We could have a display option called ALLEGRO_PREFERRED_WINDOW_ADAPTER
with a value set to the adapter preferred to go full screen window on
when setting the display flag ALLEGRO_FULLSCREEN_WINDOW? Would it
override the adapter set with al_set_new_display_adapter or would it
only succeed it? Ie. New displays get created on the
'new_display_adapter', and subsequent calls to
al_set_display_option(display , ALLEGRO_PREFERRED_WINDOW_ADAPTER ,
adapter) would move the window onto the specified adapter? Should it
move a window or only control the monitor that it goes full screen
window on? Would it move the full screen window onto another monitor if
it was already full screen? If you can answer some of these questions, I
can begin to work on a patch for it.


Yeah, I kind of like the display option idea. I suggest that it 
overrides al_set_new_display_adapter. If possible, it'd be nice to move 
it, but if not, I think just being able to select it for the next full 
screen transition would be good.


-SL

___
Allegro-developers mailing list
Allegro-developers@gna.org
https://mail.gna.org/listinfo/allegro-developers


Re: [AD] Adding a preferred window adapter parameter for going fullscreen window

2016-11-30 Thread Edgar Reynaldo



On 11/27/2016 7:46 PM, SiegeLord wrote:

On 11/27/2016 12:50 PM, Edgar Reynaldo wrote:

It's not the unmaximize behavior, it's the switch from fullscreen window
to window (al_set_display_flag(display , ALLEGRO_FULLSCREEN_WINDOW ,
false). The restore behavior (al_set_display_flag(display ,
ALLEGRO_MAXIMIZE , false) works fine. There is code in there to
deliberately center the window on the display, ignoring the previous
position of the window.


Whoops. Still think it's a bug, as this doesn't happen on Linux.



Question : Wouldn't adding a member to the WIN_DISPLAY_DRIVER struct
mess with ABI compatibility?


No, it's not part of the public ABI, so it's fine to change as you want.

-SL


So what would the preferred course of action be then?

We can allow a user to set a preferred full screen window adapter, or we 
can choose to go full screen window on the monitor that the window is 
currently over. Which would be prefereable? Perhaps both?


We could have a display option called ALLEGRO_PREFERRED_WINDOW_ADAPTER 
with a value set to the adapter preferred to go full screen window on 
when setting the display flag ALLEGRO_FULLSCREEN_WINDOW? Would it 
override the adapter set with al_set_new_display_adapter or would it 
only succeed it? Ie. New displays get created on the 
'new_display_adapter', and subsequent calls to 
al_set_display_option(display , ALLEGRO_PREFERRED_WINDOW_ADAPTER , 
adapter) would move the window onto the specified adapter? Should it 
move a window or only control the monitor that it goes full screen 
window on? Would it move the full screen window onto another monitor if 
it was already full screen? If you can answer some of these questions, I 
can begin to work on a patch for it.


Edgar



___
Allegro-developers mailing list
Allegro-developers@gna.org
https://mail.gna.org/listinfo/allegro-developers


Re: [AD] Adding a preferred window adapter parameter for going fullscreen window

2016-11-27 Thread SiegeLord

On 11/27/2016 12:50 PM, Edgar Reynaldo wrote:

It's not the unmaximize behavior, it's the switch from fullscreen window
to window (al_set_display_flag(display , ALLEGRO_FULLSCREEN_WINDOW ,
false). The restore behavior (al_set_display_flag(display ,
ALLEGRO_MAXIMIZE , false) works fine. There is code in there to
deliberately center the window on the display, ignoring the previous
position of the window.


Whoops. Still think it's a bug, as this doesn't happen on Linux.



Question : Wouldn't adding a member to the WIN_DISPLAY_DRIVER struct
mess with ABI compatibility?


No, it's not part of the public ABI, so it's fine to change as you want.

-SL

___
Allegro-developers mailing list
Allegro-developers@gna.org
https://mail.gna.org/listinfo/allegro-developers


Re: [AD] Adding a preferred window adapter parameter for going fullscreen window

2016-11-27 Thread Edgar Reynaldo



On 11/26/2016 01:04 PM, Edgar Reynaldo wrote:

Hello guys,

I was wondering if it would be possible to add a member to the
ALLEGRO_DISPLAY_WIN struct called 'preferred_window_adapter'. This would
allow us to go fullscreen window on any monitor, instead of only being
able to go fullscreen window on the adapter the window was created on.

In _al_win_set_display_flag on line 1195 of allegro5/src/win/wwindow.c ,
the adapter used to go fullscreen window is set to the adapter that the
window was created on. If we set a preferred window adapter, we could go
fullscreen window on any monitor that the window was over or onto any
specific available adapter. This ability was requested by SilverSthan on
the allegro.cc forum.

Maximize currently works the same way, and when you maximize a window on
Windows, it maximizes onto the display that the adapter is over. If we
set a preferred adapter or check for a specific monitor that the window
is over, then we can mimic this behavior.

Something I have noted about returning from fullscreen window to window
mode is that it centers the window and ignores the last known position
of the window. I feel this is a bug, or at least undesirable behavior.
I'm willing to work on a patch for this.

I don't know what work it would take to mimic this behavior on
Linux/OSX, whatever else, but I'm willing to look into it. However I
don't have anything other than a Windows machine to test it on atm.


On 11/26/2016 10:48 PM, SiegeLord wrote:
Seems like a fine idea. The un-maximize behavior sounds like a bug, it 
certainly doesn't do that on Linux at least.


-SL
It's not the unmaximize behavior, it's the switch from fullscreen window 
to window (al_set_display_flag(display , ALLEGRO_FULLSCREEN_WINDOW , 
false). The restore behavior (al_set_display_flag(display , 
ALLEGRO_MAXIMIZE , false) works fine. There is code in there to 
deliberately center the window on the display, ignoring the previous 
position of the window.


Question : Wouldn't adding a member to the WIN_DISPLAY_DRIVER struct 
mess with ABI compatibility?





___
Allegro-developers mailing list
Allegro-developers@gna.org
https://mail.gna.org/listinfo/allegro-developers


Re: [AD] Adding a preferred window adapter parameter for going fullscreen window

2016-11-26 Thread SiegeLord
Seems like a fine idea. The un-maximize behavior sounds like a bug, it 
certainly doesn't do that on Linux at least.


-SL

On 11/26/2016 01:04 PM, Edgar Reynaldo wrote:

Hello guys,

I was wondering if it would be possible to add a member to the
ALLEGRO_DISPLAY_WIN struct called 'preferred_window_adapter'. This would
allow us to go fullscreen window on any monitor, instead of only being
able to go fullscreen window on the adapter the window was created on.

In _al_win_set_display_flag on line 1195 of allegro5/src/win/wwindow.c ,
the adapter used to go fullscreen window is set to the adapter that the
window was created on. If we set a preferred window adapter, we could go
fullscreen window on any monitor that the window was over or onto any
specific available adapter. This ability was requested by SilverSthan on
the allegro.cc forum.

Maximize currently works the same way, and when you maximize a window on
Windows, it maximizes onto the display that the adapter is over. If we
set a preferred adapter or check for a specific monitor that the window
is over, then we can mimic this behavior.

Something I have noted about returning from fullscreen window to window
mode is that it centers the window and ignores the last known position
of the window. I feel this is a bug, or at least undesirable behavior.
I'm willing to work on a patch for this.

I don't know what work it would take to mimic this behavior on
Linux/OSX, whatever else, but I'm willing to look into it. However I
don't have anything other than a Windows machine to test it on atm.

PS. Anybody look at that patch for the OpenGL functions I wrote?



___
Allegro-developers mailing list
Allegro-developers@gna.org
https://mail.gna.org/listinfo/allegro-developers


___
Allegro-developers mailing list
Allegro-developers@gna.org
https://mail.gna.org/listinfo/allegro-developers