Ver código fonte

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 anos atrás
pai
commit
9fa3a5d19d
1 arquivos alterados com 3 adições e 0 exclusões
  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)