# Prevent Window from Opening as a tab

**URL:** <https://forum.xojo.com/t/prevent-window-from-opening-as-a-tab/70176>\
**Category:** macOS\
**Created:** [May 11, 2022, 7:19pm UTC](https://forum.xojo.com/t/prevent-window-from-opening-as-a-tab/70176 "2022-05-11T19:19:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jon\_Ogden](https://forum.xojo.com/user_avatar/forum.xojo.com/jon_ogden/32/494_2.png) [@Jon\_Ogden](https://forum.xojo.com/u/Jon_Ogden)\
**Post date:** [May 11, 2022, 7:19pm UTC](https://forum.xojo.com/t/prevent-window-from-opening-as-a-tab/70176/1 "2022-05-11T19:19:01Z")

</div>

Hey all,

I just had a bug reported that I had previously no idea about in my app. If you set the system preferences in MacOS to “Prefer Tabs Always” when opening documents, I am having some of my windows open as a tab in other windows. I don’t want that. But what’s strange is not every window opens as a tab. Some open correctly but others don’t and I can’t find what it is that makes it behave one way or another.

How can you force a window to open as a window and not a tab?

---

<div class="post-metadata">

**Author:** ![Anthony\_G\_Cyphers](https://forum.xojo.com/user_avatar/forum.xojo.com/anthony_g_cyphers/32/16862_2.png) [@Anthony\_G\_Cyphers](https://forum.xojo.com/u/Anthony_G_Cyphers)\
**Post date:** [May 11, 2022, 7:27pm UTC](https://forum.xojo.com/t/prevent-window-from-opening-as-a-tab/70176/2 "2022-05-11T19:27:12Z")

</div>

Take a look at this recent thread for some methods of disabling the auto window tabbing feature.

> [@Double titles on Mac Document windows](https://forum.xojo.com/t/double-titles-on-mac-document-windows/69422/9):
>
> Sorry… after reading a little more, it looks like you need Declare Sub SetTabbingMode Lib "AppKit" selector "setTabbingMode:" (obj as Ptr, value as integer) SetTabbingMode(w.handle, 2) // 2 = Disabled If you’re using API 1, you’ll need to change obj as Ptr to obj as Integer
