QTfrontend/game.cpp
branchui-scaling
changeset 15663 d92eeb468dad
parent 15283 c4fd2813b127
parent 15299 3bf780084c86
child 15845 ad43384fbbe9
--- a/QTfrontend/game.cpp	Wed Jul 31 23:14:27 2019 +0200
+++ b/QTfrontend/game.cpp	Fri Jul 03 23:51:47 2020 +0200
@@ -507,9 +507,20 @@
             // fetch new window resolution via IPC and save it in the settings
             int size = msg.size();
             QString newResolution = QString().append(msg.mid(2)).left(size - 4);
+            bool windowMaximized;
+            if (newResolution.endsWith('M'))
+            {
+                windowMaximized = true;
+                newResolution.chop(1);
+            }
+            else
+            {
+                windowMaximized = false;
+            }
             QStringList wh = newResolution.split('x');
             config->Form->ui.pageOptions->windowWidthEdit->setValue(wh[0].toInt());
             config->Form->ui.pageOptions->windowHeightEdit->setValue(wh[1].toInt());
+            config->vid_SetMaximized(windowMaximized);
             break;
         }
         case '~':
@@ -609,6 +620,8 @@
     arguments << QString::number(resolutions.second.width());
     arguments << "--height";
     arguments << QString::number(resolutions.second.height());
+    if (config->vid_Maximized())
+        arguments << "--maximized";
     if (config->zoom() != 100) {
         arguments << "--zoom";
         arguments << QString::number(config->zoom());