[02 Apr 2012] Display mode WINDOWED / FULLSCREEN with more than 1 window

Contains all messages from the Hollywood mailing list between 01/2006 and 08/2012
Locked
nexus
Posts: 127
Joined: Sun Mar 07, 2010 11:54 am

[02 Apr 2012] Display mode WINDOWED / FULLSCREEN with more than 1 window

Post by nexus »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Mon, 02 Apr 2012 10:04:51 -0000

When using only one window/display, it is possible to switch fullscreen/windowed mode of an hollywood application by using the shortcut 'LCOMMAND + RETURN' on AmigaOS (and LALT + RETURN in Linux).

When using more then 1 window/display, the shortcut seems to be ignored.

So, I tried to implement that myself and found the following hint in the documentation for 'ChangeDisplayMode()':

"Please note that whenever you switch into full screen mode, only a single display should be opened. Hollywood currently does not enforce this rule because with the AmigaOS concept of screens, it is possible to have multiple displays even in full screen mode. However, this is only possible in the Amiga version. All other platforms do not support multiple displays in full screen mode, so it is probably better to generally stick with a single display whenever you plan to go into full screen mode."

Well, I don't know if this is true for Windows or MacOS, but for Linux it is not. On linux, you can run 2 X-Servers, or 1 X-Server on multiple monitors and in addition, you have different desktops. So, there are multiple useful options to have one window in fullscreen mode and one in windowed (or in fullscreen mode, too).

My personal usage for this is, that one window runs in fullscreen on a display associated to an external monitor / projector (showing my presentation) and one window (in windowed or fullscreen mode) on my laptop screen (showing only contents to me).

I tried to achieve that and switched the screenmode when catching the COMMAND/ALT-RETURN keys.

Doing that, I observed the following:

a) Switching to FULLSCREEN mode affects always all opened windows/displays and they always go fullscreen on the same screen. The "active" window is put to front, though. This is independent of which display has been selected as output device by SelectDisplay().

b) Switching back to WINDOWED Mode does not restore the previous positions of all windows but seem to be derived from only one window? In my case both windows were always centred while only one window should have been centred.

To achieve what I liked to achive, I had to do the following workaround:

1) When switching screenmodes, always close and remove all displays that should not go to fullscreen mode on the primary screen (or those which don't switch back from fullscreen mode to windowed mode).

2) Then, switch the screenmode for the single remaining window

3) Recreate the windows/displays which have been removed in step 1) and redraw all their previous contents.

Since, by default, a new window is opened in WINDOWED mode, I have afterwards 1 window in fullscreen and the rest in windowed mode. The workaround works at least for 2 windows. I finally can drag the non-fullscreen windows to my second monitor and have the environment, which I wanted to have.

However, this seems to be a little bit unconvenient ;)

So, it would be nice, if one could specify, which window/display should go to fullscreen and keep all other windows/displays uneffected.

Moreover, I have one more feature request :)

It would be nice if it were possible to specify on which Screen a window should be opened (or should go to fullscreen). On AmigaOS that would be the PublicScreen-Name and on Linux it is usually specified in this way DISPLAY=host:X.Y with X is the X-Server number and Y the desktop number, e.g. localhost:0.0 (that's the default, I think). Usually, the hostname can be empty, such that e.g. " xterm -display :0.1" opens a xterm window on the second desktop (associated to a second monitor) on the X-Server started first.

Thanks! Tom

So, i tried to get this scenario

User avatar
airsoftsoftwair
Posts: 4350
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

[10 Apr 2012] Re: Display mode WINDOWED / FULLSCREEN with more than 1 window

Post by airsoftsoftwair »

Note: This is an archived post that was originally sent to the Hollywood mailing list on Tue, 10 Apr 2012 11:49:16 +0200
When using only one window/display, it is possible to switch fullscreen/windowed mode of an hollywood application by using the shortcut 'LCOMMAND + RETURN' on AmigaOS (and LALT + RETURN in Linux).

When using more then 1 window/display, the shortcut seems to be ignored.

So, I tried to implement that myself and found the following hint in the documentation for 'ChangeDisplayMode()':

"Please note that whenever you switch into full screen mode, only a single display should be opened. Hollywood currently does not enforce this rule because with the AmigaOS concept of screens, it is possible to have multiple displays even in full screen mode. However, this is only possible in the Amiga version. All other platforms do not support multiple displays in full screen mode, so it is probably better to generally stick with a single display whenever you plan to go into full screen mode."
The rationale behind this is that I want to preserve the possibility of writing to the frame buffer of the graphics board directly when in full screen mode because this will give high speed graphics. On Windows and Mac this is possible, on Linux probably not.
Well, I don't know if this is true for Windows or MacOS, but for Linux it is not. On linux, you can run 2 X-Servers, or 1 X-Server on multiple monitors and in addition, you have different desktops. So, there are multiple useful options to have one window in fullscreen mode and one in windowed (or in fullscreen mode, too).

My personal usage for this is, that one window runs in fullscreen on a display associated to an external monitor / projector (showing my presentation) and one window (in windowed or fullscreen mode) on my laptop screen (showing only contents to me).

I tried to achieve that and switched the screenmode when catching the COMMAND/ALT-RETURN keys.

Doing that, I observed the following:

a) Switching to FULLSCREEN mode affects always all opened windows/displays and they always go fullscreen on the same screen. The "active" window is put to front, though. This is independent of which display has been selected as output device by SelectDisplay().

b) Switching back to WINDOWED Mode does not restore the previous positions of all windows but seem to be derived from only one window? In my case both windows were always centred while only one window should have been centred.
Hmm, interesting observation. I'll have to look into this.
To achieve what I liked to achive, I had to do the following workaround:

1) When switching screenmodes, always close and remove all displays that should not go to fullscreen mode on the primary screen (or those which don't switch back from fullscreen mode to windowed mode).

2) Then, switch the screenmode for the single remaining window

3) Recreate the windows/displays which have been removed in step 1) and redraw all their previous contents.

Since, by default, a new window is opened in WINDOWED mode, I have afterwards 1 window in fullscreen and the rest in windowed mode. The workaround works at least for 2 windows. I finally can drag the non-fullscreen windows to my second monitor and have the environment, which I wanted to have.

However, this seems to be a little bit unconvenient ;)

So, it would be nice, if one could specify, which window/display should go to fullscreen and keep all other windows/displays uneffected.

Moreover, I have one more feature request :)

It would be nice if it were possible to specify on which Screen a window should be opened (or should go to fullscreen). On AmigaOS that would be the PublicScreen-Name and on Linux it is usually specified in this way DISPLAY=host:X.Y with X is the X-Server number and Y the desktop number, e.g. localhost:0.0 (that's the default, I think). Usually, the hostname can be empty, such that e.g. " xterm -display :0.1" opens a xterm window on the second desktop (associated to a second monitor) on the X-Server started first.
I've added these suggestions to my list. I'll investigate into this when I have time and will see if it makes sense to change the implementation then :)

Locked