Explorar o código

DisplayComponent: force display manager reinit in switchCommand()

This guarantees we get the newest state. Should not be needed, bit will
help if there is a problem with this.
Vincent Lang %!s(int64=9) %!d(string=hai) anos
pai
achega
f130b0ad61
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      src/display/DisplayComponent.cpp

+ 6 - 0
src/display/DisplayComponent.cpp

@@ -318,6 +318,12 @@ void DisplayComponent::switchCommand(QString command)
     return;
   }
 
+  if (!initializeDisplayManager())
+  {
+    QLOG_ERROR() << "Could not reinitialize display manager";
+    return;
+  }
+
   int currentDisplay = getApplicationDisplay();
   if (currentDisplay < 0)
   {