Switching a Boopsi WB Window to fullscreen.. Just 2 problems
I'm starting to have some nice BOOPSI Applications under OS3,
at the moment I'm trying to add the possibility of switching the app to fullscreen mode and window mode under WB. (OS3.2.3)
For that, I allocate the layouts and the BOOPSI window once at and for all with NewObject(WINDOW_GetClass(),...), but at that moment I only specify WINDOW_ParentGroup, and I differentiate the opening in fullscreen or in window further.
In fullscreen, I want my gadgets to take up all the background of the screen after the menu bar, so with SetAttrs() I suddenly put: WA_CustomScreen,myScreen, WA_Backdrop,TRUE, WA_Borderless,TRUE, WA_CloseGadget,FALSE, WA_Title,NULL,...
Only then do I do DoMethod WM_OPEN.
.. if I want to open the window I put:
WA_CustomScreen,WBScreen, WA_Backdrop,FALSE, WA_Borderless,FALSE,
WA_CloseGadget,TRUE, WA_Title,"title",...
Then DoMethod WM_OPEN.
Both work if it's the first opening.
But I have 2 Problems:
- 1. If I want to switch from window mode to fullscreen mode during the life of the app,
I open as a window first, then I do WM_CLOSE, then I reconfigure with SetAttrib to put in fullscreen, then I redo WM_OPEN: in this case the close gadget does not disappear and it keeps the window bar in addition of the screen bar. Looks like WA_CloseGadget can't be removed anymore. As a result, my switch system does not work completely. Bug I would say!
- 2. in fullscreen mode I want a window taking up all the width and height available at the bottom of the screen for my layouts and gadgets, so I have WA_Borderless and WA_Left at 0 and WA_Width at the exact width of the screen. In this case it sticks the start of the layout to x=0, but it cuts the width and height of the layout to the size that would correspond to the dimensions with borders. It therefore cuts about 8 pixels to the left and bottom. I tried WA_MaxWidth with width+8 and WA_Width with +8, it changes nothing. The min max dimensions of the mother layout does not take into account the BOOPSI window size with WA_Borderless, TRUE. Bug I would say !
Code at:
https://github.com/krabobmkd/aukadicty/blob/krb/devifs/aukboopsi/boopsi…
I have also noticed that a fullscreen backdrop window using Reaction causes the window not to extend the full dimensions. I will look into why and if it can be addressed. Actually, it could be the layout allowing some padding now I think about it.
Yep I add this is enoying, because if you want a full background window and there is a gap that is not part of the window on some border, clicking it loose the ativation of the window, which then need 2 clicks for the buttons.
if the background window takes the whole screen surface this window is always activated with the screen in all cases, which basically means the screen is the window.
Online Status
I found a way to have the mother layout on the full screen. After setAttribs() to configure backdrop and borderless, and After the WM_OPEN, I do:
... and that's it fullscreen app below the menu bar ! The other problem removing the close button from window mode is still to be adressed.
.. Edit:a fter test: NO ! it also solved the persistant removed closebutton ! So no more problems !
... re-edit after further tests: Very strange, in fullscreen attached window, it looks like I also need to set the window size width and heigt to +32 of the screen size, to allow then the main layout resize to exact size... and If I mutate the state from WBWindow to fullscreen backdrop, it looks like the window close icon is finally still there,hidden under the screen toolbar ... well: factually works like I wanted, but we are in the land of trickyness it seems.