ソースを参照

KonvergoWindow: strictly ignore forceFSScreen if it's empty

In theory, QScreen::name() could return an empty string. Then this could
would do something, even if the forceFSScreen setting is disabled.

Check it explicitly to avoid this. This also means the setting won't
work if a screen actually has an empty name, but such is life.
Vincent Lang 7 年 前
コミット
9fa3a5d19d
1 ファイル変更3 行追加0 行削除
  1. 3 0
      src/ui/KonvergoWindow.cpp

+ 3 - 0
src/ui/KonvergoWindow.cpp

@@ -442,6 +442,9 @@ void KonvergoWindow::updateForcedScreen()
 {
   QString screenName = SettingsComponent::Get().value(SETTINGS_SECTION_MAIN, "forceFSScreen").toString();
 
+  if (screenName.isEmpty())
+    return;
+
   for (QScreen* scr : QGuiApplication::screens())
   {
     if (scr->name() == screenName)