Docking windows????

Ok I just noticed something a little while ago… When running my app and I have a window open and then open another window it docks with the first one, even if the first one is too small.

When did this start and is there a way to turn off this behavior.

Thanks

Rich

This sounds like it’s in your code or an app you have on your computer…

It sounded like Sierra’s auto-tabs feature to me. Richard, if that’s what it is, then see this thread - https://forum.xojo.com/34310-sierra-auto-tabbing - for MBS properties and a Declare to switch it off.

[quote=321774:@Richard Albrecht]Ok I just noticed something a little while ago… When running my app and I have a window open and then open another window it docks with the first one, even if the first one is too small.

When did this start and is there a way to turn off this behavior.

Thanks

Rich[/quote]
Windows or Mac? I seem to recall that this is a feature of macOS Sierra.

Yup
Its sierra.
And its a problem when (as the OP says), 2 documents of vastly different sizes are opened.

Its a bigger problem for Xojo apps because there is no event that tells you that your window has resized.
Buttons and status bars at the bottom suddenly become obscured with no automatic way to move them.

I’ve turned this off using the call above. (Much as I had to stop MacOS from making ALL my windows maximised if one of them went full screen. A small dialog with 4 controls on it looks stupid when it fills the screen)

Do you mean that both windows are combined into one? Or do you mean that they snap together at the edges?

Yeah okay, to stop that you need the following code.

[code]Public Sub zoomButtonAction(extends w as window, assigns value as integer)
#if targetMacOS then
Declare Function collectionBehavior Lib “AppKit” Selector “collectionBehavior” ( obj As Integer ) As UInteger
Declare Sub setCollectionBehavior Lib “AppKit” Selector “setCollectionBehavior:” ( obj As Integer, value As UInteger )

Dim behavior As UInteger = collectionBehavior( w.Handle )
setCollectionBehavior( w.handle, behavior Or value )

#endif
End Sub
[/code]

Const kZoomButtonActionZoom = 512

Then call it in the open event of the window.

me.zoomButtonAction = kZoomButtonActionZoom

In some apps I’ve been adding an option so that the user can specify if they want Full Screen or the classic way. In some others I’ve just defaulted to the classic way because it makes zero sense for the window to go Full Screen.