|
|
@@ -32,14 +32,6 @@
|
|
|
#include <QPushButton>
|
|
|
#include <QToolBar>
|
|
|
|
|
|
-#if !defined(_WIN32) && !defined(__APPLE__)
|
|
|
-#include <obs-nix-platform.h>
|
|
|
-#endif
|
|
|
-
|
|
|
-#ifdef ENABLE_WAYLAND
|
|
|
-#include <qpa/qplatformnativeinterface.h>
|
|
|
-#endif
|
|
|
-
|
|
|
static inline void OBSErrorBoxva(QWidget *parent, const char *msg, va_list args)
|
|
|
{
|
|
|
char full_message[8192];
|
|
|
@@ -120,38 +112,6 @@ void OBSMessageBox::critical(QWidget *parent, const QString &title,
|
|
|
mb.exec();
|
|
|
}
|
|
|
|
|
|
-bool QTToGSWindow(QWindow *window, gs_window &gswindow)
|
|
|
-{
|
|
|
- bool success = true;
|
|
|
-
|
|
|
-#ifdef _WIN32
|
|
|
- gswindow.hwnd = (HWND)window->winId();
|
|
|
-#elif __APPLE__
|
|
|
- gswindow.view = (id)window->winId();
|
|
|
-#else
|
|
|
- switch (obs_get_nix_platform()) {
|
|
|
- case OBS_NIX_PLATFORM_X11_EGL:
|
|
|
- gswindow.id = window->winId();
|
|
|
- gswindow.display = obs_get_nix_platform_display();
|
|
|
- break;
|
|
|
-#ifdef ENABLE_WAYLAND
|
|
|
- case OBS_NIX_PLATFORM_WAYLAND: {
|
|
|
- QPlatformNativeInterface *native =
|
|
|
- QGuiApplication::platformNativeInterface();
|
|
|
- gswindow.display =
|
|
|
- native->nativeResourceForWindow("surface", window);
|
|
|
- success = gswindow.display != nullptr;
|
|
|
- break;
|
|
|
- }
|
|
|
-#endif
|
|
|
- default:
|
|
|
- success = false;
|
|
|
- break;
|
|
|
- }
|
|
|
-#endif
|
|
|
- return success;
|
|
|
-}
|
|
|
-
|
|
|
uint32_t TranslateQtKeyboardEventModifiers(Qt::KeyboardModifiers mods)
|
|
|
{
|
|
|
int obsModifiers = INTERACT_NONE;
|