# New Canvas opened as a tab of old window

**URL:** <https://root-forum.cern.ch/t/new-canvas-opened-as-a-tab-of-old-window/40165>\
**Category:** ROOT\
**Created:** [July 1, 2020, 1:20am UTC](https://root-forum.cern.ch/t/new-canvas-opened-as-a-tab-of-old-window/40165 "2020-07-01T01:20:01Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![tkoiwai](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/tkoiwai/32/20770_2.png) [@tkoiwai](https://root-forum.cern.ch/u/tkoiwai)\
**Post date:** [July 1, 2020, 1:20am UTC](https://root-forum.cern.ch/t/new-canvas-opened-as-a-tab-of-old-window/40165/1 "2020-07-01T01:20:02Z")

</div>

_ROOT Version:_ 6.08.06  
_Platform:_ macOS Mojave 10.14.6  
_Compiler:_ gcc 4.2.1

* * *

Hi, ROOT users.

When I open a new window with another window existing, it always opened as a tab of the old window. (Here “window” includes canvas, fit panel, TBrowser and so on.)  
How can I open a new individual window?

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [July 1, 2020, 6:19am UTC](https://root-forum.cern.ch/t/new-canvas-opened-as-a-tab-of-old-window/40165/2 "2020-07-01T06:19:02Z")

</div>

- To open a new Canvas only: Menu `File` -\> `New Canvas`
- To open a new Browser: Menu `Browser` -\> `Browse...`

---

<div class="post-metadata">

**Author:** ![tkoiwai](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/tkoiwai/32/20770_2.png) [@tkoiwai](https://root-forum.cern.ch/u/tkoiwai)\
**Post date:** [July 1, 2020, 6:34am UTC](https://root-forum.cern.ch/t/new-canvas-opened-as-a-tab-of-old-window/40165/3 "2020-07-01T06:34:03Z")

</div>

Thanks for the response.  
That also creates a tab on the existing window. I want to create second window.

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [July 1, 2020, 6:37am UTC](https://root-forum.cern.ch/t/new-canvas-opened-as-a-tab-of-old-window/40165/4 "2020-07-01T06:37:25Z")

</div>

We are talking about a TBrowser, right? If you follow what I said, it cannot create a new Tab in the TBrowser… How did you start the TBrowser?

---

<div class="post-metadata">

**Author:** ![tkoiwai](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/tkoiwai/32/20770_2.png) [@tkoiwai](https://root-forum.cern.ch/u/tkoiwai)\
**Post date:** [July 1, 2020, 6:51am UTC](https://root-forum.cern.ch/t/new-canvas-opened-as-a-tab-of-old-window/40165/5 "2020-07-01T06:51:45Z")

</div>

no, not only TBrowser.  
For instance, if I create two TCanvas, I want ROOT to create two individual window for each TCanvas. But my ROOT create only one window with two tabs.

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [July 1, 2020, 6:57am UTC](https://root-forum.cern.ch/t/new-canvas-opened-as-a-tab-of-old-window/40165/6 "2020-07-01T06:57:13Z")

</div>

I’m puzzled, can you tell me how you create your TCanvas? From The command line?, if you type:

```auto
root [0] TCanvas c1("c1", "c1")
(TCanvas &) Name: c1 Title: c1
root [1] TCanvas c2("c2", "c2")
(TCanvas &) Name: c2 Title: c2
root [2]

```

You have only one window with two tabs? Maybe it’s a MacOS particularity. @couet do you know how this is possible?

---

<div class="post-metadata">

**Author:** ![tkoiwai](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/tkoiwai/32/20770_2.png) [@tkoiwai](https://root-forum.cern.ch/u/tkoiwai)\
**Post date:** [July 1, 2020, 7:14am UTC](https://root-forum.cern.ch/t/new-canvas-opened-as-a-tab-of-old-window/40165/7 "2020-07-01T07:14:19Z")

</div>

In any way, ROOT just adds a tab on an existing window. From the command line, from a macro… For other instance, when I call a Fit Panel from the menu bar of the window, that is also added as a tab.  
I attached a window created by the commands you wrote.

 ![2020-07-01 16.08.52](https://root-forum.cern.ch/uploads/default/original/3X/f/d/fdafa73c2c71a92ce3c4a250fb0fcdd47c72a66f.png)

---

<div class="post-metadata">

**Author:** ![dastudillo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dastudillo/32/17280_2.png) [@dastudillo](https://root-forum.cern.ch/u/dastudillo)\
**Post date:** [July 1, 2020, 8:39am UTC](https://root-forum.cern.ch/t/new-canvas-opened-as-a-tab-of-old-window/40165/8 "2020-07-01T08:39:25Z")

</div>

Could it be an OS thing not coming from ROOT? This could be one thing to check:

> **[How to Add Tabs to Almost Any App in macOS Sierra](https://www.howtogeek.com/275155/how-to-add-tabs-to-almost-any-app-in-macos-sierra/)**
>
> Ever wish you could use tabs in your favorite apps? Thanks to macOS Sierra, you can. If you can open multiple windows with an app, there’s a good chance you can combine them into one, just like you do with your browser.

  
(look for the “Merge all windows” option, or similar, and uncheck it if you have it).

---

<div class="post-metadata">

**Author:** ![tkoiwai](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/tkoiwai/32/20770_2.png) [@tkoiwai](https://root-forum.cern.ch/u/tkoiwai)\
**Post date:** [July 1, 2020, 4:02pm UTC](https://root-forum.cern.ch/t/new-canvas-opened-as-a-tab-of-old-window/40165/9 "2020-07-01T16:02:47Z")

</div>

I found the option, but that is not a permanent one. It is just an operation for the focused window.  
This can be an OS problem, but this happens only at root.exe.  
For additional info, I tried using ROOT at remote server (ubuntu 16 LTS) via ssh with XQuartz. Then this adding tab thing did not happen.

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [July 1, 2020, 4:28pm UTC](https://root-forum.cern.ch/t/new-canvas-opened-as-a-tab-of-old-window/40165/10 "2020-07-01T16:28:03Z")

</div>

Yes, for sure this is definitively not a ROOT option. At least AFAIK. Maybe @couet has an idea?

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [July 2, 2020, 6:06am UTC](https://root-forum.cern.ch/t/new-canvas-opened-as-a-tab-of-old-window/40165/11 "2020-07-02T06:06:27Z")

</div>

Sorry for the late answer.  
I do not know how you can create a such canvas with two tabs on Mac…  
no clue …Never saw a such thing … ☹

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [July 2, 2020, 7:18am UTC](https://root-forum.cern.ch/t/new-canvas-opened-as-a-tab-of-old-window/40165/12 "2020-07-02T07:18:28Z")

</div>

[Uncle Google -\> merge windows into one tabbed window](https://www.google.com/search?q=merge+windows+into+one+tabbed+window&oq=merge+windows+into+one+tabbed+window)

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [July 2, 2020, 7:33am UTC](https://root-forum.cern.ch/t/new-canvas-opened-as-a-tab-of-old-window/40165/13 "2020-07-02T07:33:01Z")

</div>

Oh yes … “Merge All windows” in the menu bar… it works for canvases too. nice… never tried it.

---

<div class="post-metadata">

**Author:** ![tkoiwai](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/tkoiwai/32/20770_2.png) [@tkoiwai](https://root-forum.cern.ch/u/tkoiwai)\
**Post date:** [July 3, 2020, 10:41am UTC](https://root-forum.cern.ch/t/new-canvas-opened-as-a-tab-of-old-window/40165/14 "2020-07-03T10:41:42Z")

</div>

My colleague found the source. There is a setting for this sort of thing at:  
Setting -\> Dock -\> Open document in Tab  
This was set to “always”.

Sorry for make you confuse and thanks for all your help!

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [July 17, 2020, 10:41am UTC](https://root-forum.cern.ch/t/new-canvas-opened-as-a-tab-of-old-window/40165/15 "2020-07-17T10:41:45Z")

</div>

Closed on July 17, 2020, 10:41am UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
