mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-03-06 15:46:13 -05:00
UI: Add OBSQTDisplay::OnMove()/OnDisplayChange()
This plumbing will be useful when handling color space changes. Currently does nothing, and only Windows is wired for now.
This commit is contained in:
@@ -31,6 +31,11 @@
|
||||
#include <qpointer.h>
|
||||
#include <util/c99defs.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#define WIN32_LEAN_AND_MEAN 1
|
||||
#include <Windows.h>
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
|
||||
static void CreateTransitionScene(OBSSource scene, const char *text,
|
||||
@@ -512,6 +517,33 @@ void OBSBasicProperties::closeEvent(QCloseEvent *event)
|
||||
Cleanup();
|
||||
}
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||
bool OBSBasicProperties::nativeEvent(const QByteArray &, void *message,
|
||||
qintptr *)
|
||||
#else
|
||||
bool OBSBasicProperties::nativeEvent(const QByteArray &, void *message, long *)
|
||||
#endif
|
||||
{
|
||||
#ifdef _WIN32
|
||||
const MSG &msg = *static_cast<MSG *>(message);
|
||||
switch (msg.message) {
|
||||
case WM_MOVE:
|
||||
for (OBSQTDisplay *const display :
|
||||
findChildren<OBSQTDisplay *>()) {
|
||||
display->OnMove();
|
||||
}
|
||||
break;
|
||||
case WM_DISPLAYCHANGE:
|
||||
for (OBSQTDisplay *const display :
|
||||
findChildren<OBSQTDisplay *>()) {
|
||||
display->OnDisplayChange();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void OBSBasicProperties::Init()
|
||||
{
|
||||
show();
|
||||
|
||||
Reference in New Issue
Block a user