浏览代码

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)