-
-
Notifications
You must be signed in to change notification settings - Fork 335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not add child window to parent when the child window is in the TabbedWindows of parent #2236
Conversation
…bedWindows of parent. There is a setting in macos system preferences to group windows as tabs automatically. And tabbed windows is not compatible to AddChildWindow relationship.
dbe2e7b
to
0c60240
Compare
using System;
using Eto.Forms;
using Eto.Drawing;
namespace Tutorial1
{
public class MyForm : Form
{
static bool firstShown = true;
public MyForm(Window parent = null)
{
if(parent != null)
{
this.Owner = parent;
}
if(firstShown)
{
firstShown = false;
Application.Instance.InvokeAsync(() => (new MyForm(this)).Show());
}
// Set ClientSize instead of Size, as each platform has different window border sizes
ClientSize = new Size(600, 400);
// Title to show in the title bar
Title = "Hello, Eto.Forms";
// Content of the form
Content = new Label { Text = "Some content", VerticalAlignment = VerticalAlignment.Center, TextAlignment = TextAlignment.Center };
}
}
class Program
{
[STAThread]
public static void Main(string[] args)
{
new Application().Run(new MyForm());
}
}
}
using System;
using Eto.Forms;
using Eto.Drawing;
namespace Tutorial1
{
public class MyForm : Form
{
static bool firstShown = true;
public MyForm(Window parent = null)
{
if(parent != null)
{
this.Owner = parent;
}
if(firstShown)
{
firstShown = false;
Application.Instance.InvokeAsync(() => (new MyForm(this)).Show());
}
// Set ClientSize instead of Size, as each platform has different window border sizes
ClientSize = new Size(600, 400);
// Title to show in the title bar
Title = "Hello, Eto.Forms";
// Content of the form
Content = new Label { Text = "Some content", VerticalAlignment = VerticalAlignment.Center, TextAlignment = TextAlignment.Center };
}
}
class Program
{
[STAThread]
public static void Main(string[] args)
{
new Application().Run(new MyForm());
}
}
} If you click on the parent tab, the tabbar is gone, click again the whole window is gone Screen.Recording.2022-06-04.at.7.49.44.AM.mp4 |
Also, I just tested your test program, it fails too. |
Just tested on high sierra, the issue exists. |
Hm, yeah you're right. Clicking on the "parent" window causes them to disappear, but then switching to another app then back brings them back. I'll have to investigate why that's happening, you should certainly be able to have a child window even when using tabs. |
Sorry this took so long to get in! Thanks for the contribution! |
There is a setting in macos system preferences to group windows as tabs automatically. And tabbed windows is not compatible to AddChildWindow relationship.