mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
attempt to fix the tabs that sometimes get added
This commit is contained in:
parent
748920e8fd
commit
ea28269951
2 changed files with 8 additions and 4 deletions
|
@ -219,13 +219,16 @@ Window &WindowManager::getSelectedWindow()
|
||||||
return *this->selectedWindow_;
|
return *this->selectedWindow_;
|
||||||
}
|
}
|
||||||
|
|
||||||
Window &WindowManager::createWindow(WindowType type)
|
Window &WindowManager::createWindow(WindowType type, bool show)
|
||||||
{
|
{
|
||||||
assertInGuiThread();
|
assertInGuiThread();
|
||||||
|
|
||||||
auto *window = new Window(type);
|
auto *window = new Window(type);
|
||||||
this->windows_.push_back(window);
|
this->windows_.push_back(window);
|
||||||
window->show();
|
if (show)
|
||||||
|
{
|
||||||
|
window->show();
|
||||||
|
}
|
||||||
|
|
||||||
if (type != WindowType::Main)
|
if (type != WindowType::Main)
|
||||||
{
|
{
|
||||||
|
@ -293,7 +296,7 @@ void WindowManager::initialize(Settings &settings, Paths &paths)
|
||||||
type = WindowType::Popup;
|
type = WindowType::Popup;
|
||||||
}
|
}
|
||||||
|
|
||||||
Window &window = createWindow(type);
|
Window &window = createWindow(type, false);
|
||||||
|
|
||||||
if (window_obj.value("state") == "maximized")
|
if (window_obj.value("state") == "maximized")
|
||||||
{
|
{
|
||||||
|
@ -399,6 +402,7 @@ void WindowManager::initialize(Settings &settings, Paths &paths)
|
||||||
colNr++;
|
colNr++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
window.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mainWindow_ == nullptr)
|
if (mainWindow_ == nullptr)
|
||||||
|
|
|
@ -46,7 +46,7 @@ public:
|
||||||
|
|
||||||
Window &getMainWindow();
|
Window &getMainWindow();
|
||||||
Window &getSelectedWindow();
|
Window &getSelectedWindow();
|
||||||
Window &createWindow(WindowType type);
|
Window &createWindow(WindowType type, bool show = true);
|
||||||
|
|
||||||
int windowCount();
|
int windowCount();
|
||||||
Window *windowAt(int index);
|
Window *windowAt(int index);
|
||||||
|
|
Loading…
Reference in a new issue