Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net-im/telegram-desktop: update to 4.9.8 release
* Backport webview patches from upstream * Fix build with qt5, required #include <private/qgenericunixservices_p.h> is still provided by QtServiceSupport module but moved to QtGui in Qt6 PR: 274143
- Loading branch information
Showing
6 changed files
with
123 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
TIMESTAMP = 1695648456 | ||
SHA256 (tdesktop-4.9.3-full.tar.gz) = 2ef462651d397d807576f5df3a5d3de2764accf8d155a0b4d576a354a614d107 | ||
SIZE (tdesktop-4.9.3-full.tar.gz) = 69517868 | ||
TIMESTAMP = 1695904525 | ||
SHA256 (tdesktop-4.9.8-full.tar.gz) = af041ecb623ee7603781e0ff2b262e15bb8de2858a9a42982a10396bc9014d53 | ||
SIZE (tdesktop-4.9.8-full.tar.gz) = 73655253 |
14 changes: 14 additions & 0 deletions
14
...p/files/patch-Telegram_lib__webview_webview_platform_linux_webview__linux__compositor.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- Telegram/lib_webview/webview/platform/linux/webview_linux_compositor.cpp.orig 2023-09-22 07:01:01 UTC | ||
+++ Telegram/lib_webview/webview/platform/linux/webview_linux_compositor.cpp | ||
@@ -199,8 +199,9 @@ Compositor::Compositor() | ||
const auto output = new Output(this, xdgSurface); | ||
|
||
output->chrome().surfaceCompleted() | rpl::start_with_next([=] { | ||
- const auto parent = qvariant_cast<Output*>( | ||
- popup->parentXdgSurface()->property("output"))->window(); | ||
+ const auto parent = (*static_cast<Output * const *>( | ||
+ popup->parentXdgSurface()->property("output").constData() | ||
+ ))->window(); | ||
if (_private->widget | ||
&& parent == _private->widget->quickWindow()) { | ||
output->window()->setTransientParent( |
48 changes: 48 additions & 0 deletions
48
...op/files/patch-Telegram_lib__webview_webview_platform_linux_webview__linux__webkitgtk.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
--- Telegram/lib_webview/webview/platform/linux/webview_linux_webkitgtk.cpp.orig 2023-09-22 07:01:01 UTC | ||
+++ Telegram/lib_webview/webview/platform/linux/webview_linux_webkitgtk.cpp | ||
@@ -33,6 +33,13 @@ constexpr auto kHelperObjectPath = "/org/desktop_app/G | ||
constexpr auto kMasterObjectPath = "/org/desktop_app/GtkIntegration/Webview/Master"; | ||
constexpr auto kHelperObjectPath = "/org/desktop_app/GtkIntegration/Webview/Helper"; | ||
+void (* const SetGraphicsApi)(QSGRendererInterface::GraphicsApi) = | ||
+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) | ||
+ QQuickWindow::setGraphicsApi; | ||
+#else // Qt >= 6.0.0 | ||
+ QQuickWindow::setSceneGraphBackend; | ||
+#endif // Qt < 6.0.0 | ||
+ | ||
std::string SocketPath; | ||
inline std::string SocketPathToDBusAddress(const std::string &socketPath) { | ||
@@ -116,12 +123,10 @@ Instance::Instance(bool remoting) | ||
Ui::GL::CheckCapabilities(nullptr)); | ||
switch (backend) { | ||
case Ui::GL::Backend::Raster: | ||
- QQuickWindow::setGraphicsApi( | ||
- QSGRendererInterface::Software); | ||
+ SetGraphicsApi(QSGRendererInterface::Software); | ||
break; | ||
case Ui::GL::Backend::OpenGL: | ||
- QQuickWindow::setGraphicsApi( | ||
- QSGRendererInterface::OpenGL); | ||
+ SetGraphicsApi(QSGRendererInterface::OpenGL); | ||
break; | ||
} | ||
return true; | ||
@@ -637,11 +642,11 @@ void Instance::setOpaqueBg(QColor opaqueBg) { | ||
return; | ||
} | ||
- GdkRGBA rgba{ | ||
- opaqueBg.redF(), | ||
- opaqueBg.greenF(), | ||
- opaqueBg.blueF(), | ||
- opaqueBg.alphaF(), | ||
+ const GdkRGBA rgba{ | ||
+ float(opaqueBg.redF()), | ||
+ float(opaqueBg.greenF()), | ||
+ float(opaqueBg.blueF()), | ||
+ float(opaqueBg.alphaF()), | ||
}; | ||
webkit_web_view_set_background_color( | ||
WEBKIT_WEB_VIEW(_webview), |
44 changes: 44 additions & 0 deletions
44
net-im/telegram-desktop/files/patch-cmake_external_qt_CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- cmake/external/qt/CMakeLists.txt.orig 2023-09-13 17:06:28 UTC | ||
+++ cmake/external/qt/CMakeLists.txt | ||
@@ -16,6 +16,8 @@ if (DESKTOP_APP_USE_PACKAGED) | ||
Qt::CorePrivate | ||
Qt::Gui | ||
Qt::GuiPrivate | ||
+ $<TARGET_NAME_IF_EXISTS:Qt::ServiceSupport> | ||
+ $<TARGET_NAME_IF_EXISTS:Qt::ServiceSupportPrivate> | ||
$<TARGET_NAME_IF_EXISTS:Qt::OpenGL> | ||
Qt::Widgets | ||
Qt::WidgetsPrivate | ||
@@ -36,6 +38,7 @@ INTERFACE | ||
${qt_loc}/include | ||
${qt_loc}/include/QtCore | ||
${qt_loc}/include/QtGui | ||
+ $<$<TARGET_EXISTS:Qt::ServiceSupport>:${qt_loc}/include/QtServiceSupport> | ||
$<$<TARGET_EXISTS:Qt::OpenGL>:${qt_loc}/include/QtOpenGL> | ||
${qt_loc}/include/QtWidgets | ||
$<$<TARGET_EXISTS:Qt::OpenGLWidgets>:${qt_loc}/include/QtOpenGLWidgets> | ||
@@ -46,9 +49,11 @@ INTERFACE | ||
$<$<TARGET_EXISTS:Qt::WaylandCompositor>:${qt_loc}/include/QtWaylandCompositor> | ||
${qt_loc}/include/QtCore/${qt_version} | ||
${qt_loc}/include/QtGui/${qt_version} | ||
+ ${qt_loc}/include/QtServiceSupport/${qt_version} | ||
${qt_loc}/include/QtWidgets/${qt_version} | ||
${qt_loc}/include/QtCore/${qt_version}/QtCore | ||
${qt_loc}/include/QtGui/${qt_version}/QtGui | ||
+ ${qt_loc}/include/QtServiceSupport/${qt_version}/QtServiceSupport | ||
${qt_loc}/include/QtWidgets/${qt_version}/QtWidgets | ||
) | ||
|
||
@@ -92,6 +97,12 @@ set(common_qt_libs | ||
lib/${qt_lib_prefix}Qt${QT_VERSION_MAJOR}Gui | ||
lib/${qt_lib_prefix}Qt${QT_VERSION_MAJOR}Core | ||
) | ||
+ | ||
+if (TARGET Qt::ServiceSupport) | ||
+ list(PREPEND common_qt_libs | ||
+ lib/${qt_lib_prefix}Qt${QT_VERSION_MAJOR}ServiceSupport | ||
+ ) | ||
+endif() | ||
|
||
if (TARGET Qt::OpenGL) | ||
list(PREPEND common_qt_libs |
11 changes: 11 additions & 0 deletions
11
net-im/telegram-desktop/files/patch-cmake_external_qt_package.cmake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- cmake/external/qt/package.cmake.orig 2023-09-13 17:06:28 UTC | ||
+++ cmake/external/qt/package.cmake | ||
@@ -45,6 +45,8 @@ if (QT_VERSION_MAJOR GREATER_EQUAL 6) | ||
set(qt_version_6_5_or_greater 1) | ||
endif() | ||
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS OpenGL OpenGLWidgets REQUIRED) | ||
+else() | ||
+ find_package(Qt${QT_VERSION_MAJOR} COMPONENTS ServiceSupport REQUIRED) | ||
endif() | ||
|
||
# QtWaylandScanner cmake integration from Qt 6 is used |