1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
avoid deps for both X11 and Wayland
force xcb platform if wayland is not enabled, see https://bugs.gentoo.org/935624
--- a/avidemux/qt4/ADM_qt/src/ADM_qtx.cpp
+++ b/avidemux/qt4/ADM_qt/src/ADM_qtx.cpp
@@ -24,21 +24,29 @@ QT_LINUX_WINDOW_ENGINE admDetectQtEngine()
QString pname = currentQApplication()->platformName();
ADM_info("Running on platform %s\n", pname.toLatin1().constData());
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
+#if defined USE_X11
auto x11 = currentQApplication()->nativeInterface<QNativeInterface::QX11Application>();
if (x11)
{
ADM_info("Running on X11\n");
qtEngine = QT_X11_ENGINE;
}
+#endif // USE_X11
+#if defined USE_WAYLAND
+#if defined USE_X11
else
{
+#endif // USE_X11
auto wayland = currentQApplication()->nativeInterface<QNativeInterface::QWaylandApplication>();
if (wayland)
{
ADM_info("Running on Wayland\n");
qtEngine = QT_WAYLAND_ENGINE;
}
+#if defined USE_X11
}
+#endif // USE_X11
+#endif // USE_WAYLAND
#else
if (!strncmp(pname.toLatin1().constData(), "xcb", 3))
qtEngine = QT_X11_ENGINE;
--- a/avidemux/qt4/ADM_userInterfaces/ADM_gui/T_preview.cpp
+++ b/avidemux/qt4/ADM_userInterfaces/ADM_gui/T_preview.cpp
@@ -265,6 +265,7 @@ static void systemWindowInfo(GUI_WindowInfo *xinfo)
ADM_info("Running on platform %s\n", currentQApplication()->platformName().toLatin1().data());
switch (admDetectQtEngine())
{
+#if defined USE_X11
case QT_X11_ENGINE: {
auto x11 = currentQApplication()->nativeInterface<QNativeInterface::QX11Application>();
if (x11)
@@ -274,6 +275,8 @@ static void systemWindowInfo(GUI_WindowInfo *xinfo)
}
}
break;
+#endif // USE_X11
+#if defined USE_WAYLAND
case QT_WAYLAND_ENGINE:
{
@@ -285,6 +288,7 @@ static void systemWindowInfo(GUI_WindowInfo *xinfo)
}
}
break;
+#endif // USE_WAYLAND
default:
ADM_warning("Cannot get qt engine infos\n");
myDisplay = NULL;
--- a/avidemux/common/main.cpp
+++ b/avidemux/common/main.cpp
@@ -151,6 +151,10 @@ int main(int _argc, char *_argv[])
}
#endif
+#if ADM_UI_TYPE_BUILD == ADM_UI_QT4 && defined USE_X11 && !defined USE_WAYLAND
+ qputenv("QT_QPA_PLATFORM", "xcb");
+#endif
+
installSigHandler();
char **argv;
|