Rework Qt window handling during SDL window creation

- Avoids blindly enumeration all top-level windows
- Properly tracks screen changes during the connection process
- Starts stream window minimized if the Qt window was minimized

Fixes #1231
This commit is contained in:
Cameron Gutman
2024-03-24 21:34:54 -05:00
parent 0d67fd1ff0
commit a45695a22a
3 changed files with 48 additions and 41 deletions
+3 -3
View File
@@ -1,6 +1,7 @@
#pragma once
#include <QSemaphore>
#include <QWindow>
#include <Limelight.h>
#include <opus_multistream.h>
@@ -26,7 +27,7 @@ public:
// Use Session::exec() or DeferredSessionCleanupTask instead.
virtual ~Session() {};
Q_INVOKABLE void exec(int displayOriginX, int displayOriginY);
Q_INVOKABLE void exec(QWindow* qtWindow);
static
void getDecoderInfo(SDL_Window* window,
@@ -166,8 +167,7 @@ private:
bool m_AudioDisabled;
bool m_AudioMuted;
Uint32 m_FullScreenFlag;
int m_DisplayOriginX;
int m_DisplayOriginY;
QWindow* m_QtWindow;
bool m_ThreadedExec;
bool m_UnexpectedTermination;
SdlInputHandler* m_InputHandler;