QT: Apply maximized window handling on start-up, fixes #2921.
This commit is contained in:
@@ -808,6 +808,14 @@ MainWindow::initRendererMonitorSlot(int monitor_index)
|
|||||||
}
|
}
|
||||||
secondaryRenderer->switchRenderer((RendererStack::Renderer) vid_api);
|
secondaryRenderer->switchRenderer((RendererStack::Renderer) vid_api);
|
||||||
secondaryRenderer->setMouseTracking(true);
|
secondaryRenderer->setMouseTracking(true);
|
||||||
|
|
||||||
|
if (monitor_settings[monitor_index].mon_window_maximized) {
|
||||||
|
if (renderers[monitor_index])
|
||||||
|
renderers[monitor_index]->onResize(renderers[monitor_index]->width(),
|
||||||
|
renderers[monitor_index]->height());
|
||||||
|
|
||||||
|
device_force_redraw();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1379,12 +1387,12 @@ MainWindow::on_actionResizable_window_triggered(bool checked)
|
|||||||
{
|
{
|
||||||
if (checked) {
|
if (checked) {
|
||||||
vid_resize = 1;
|
vid_resize = 1;
|
||||||
setWindowFlag(Qt::WindowMaximizeButtonHint);
|
setWindowFlag(Qt::WindowMaximizeButtonHint, true);
|
||||||
setWindowFlag(Qt::MSWindowsFixedSizeDialogHint, false);
|
setWindowFlag(Qt::MSWindowsFixedSizeDialogHint, false);
|
||||||
setFixedSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX);
|
setFixedSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX);
|
||||||
for (int i = 1; i < MONITORS_NUM; i++) {
|
for (int i = 1; i < MONITORS_NUM; i++) {
|
||||||
if (monitors[i].target_buffer) {
|
if (monitors[i].target_buffer) {
|
||||||
renderers[i]->setWindowFlag(Qt::WindowMaximizeButtonHint);
|
renderers[i]->setWindowFlag(Qt::WindowMaximizeButtonHint, true);
|
||||||
renderers[i]->setFixedSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX);
|
renderers[i]->setFixedSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user