Use QtWaylandCompositor for webview embedding on Linux

This commit is contained in:
Ilya Fedin 2022-08-07 04:10:36 +04:00 committed by John Preston
parent ab0f12cf1c
commit 68ad56db79
7 changed files with 5 additions and 20 deletions

View File

@ -2493,8 +2493,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"lng_payments_webview_no_use" = "Unfortunately, you can't use payments with current system configuration.";
"lng_payments_webview_install_edge" = "Please install {link}.";
"lng_payments_webview_install_webkit" = "Please install WebKitGTK (webkit2gtk-5.0/webkit2gtk-4.1/webkit2gtk-4.0) using your package manager.";
"lng_payments_webview_switch_mutter" = "Qt's window embedding doesn't work well with Mutter window manager. Please switch to another window manager or desktop environment.";
"lng_payments_webview_switch_wayland" = "There is no way to embed WebView window on Wayland. Please switch to X11.";
"lng_payments_webview_update_windows" = "Please update your system to Windows 8.1 or later.";
"lng_payments_sure_close" = "Are you sure you want to close this payment form? The changes you made will be lost.";
"lng_payments_receipt_label" = "Receipt";

View File

@ -917,12 +917,6 @@ void Panel::showWebviewError(
case Error::NoGtkOrWebkit2Gtk:
rich.append(tr::lng_payments_webview_install_webkit(tr::now));
break;
case Error::MutterWM:
rich.append(tr::lng_payments_webview_switch_mutter(tr::now));
break;
case Error::Wayland:
rich.append(tr::lng_payments_webview_switch_wayland(tr::now));
break;
case Error::OldWindows:
rich.append(tr::lng_payments_webview_update_windows(tr::now));
break;

View File

@ -1088,12 +1088,6 @@ void Panel::showWebviewError(
case Error::NoGtkOrWebkit2Gtk:
rich.append(tr::lng_payments_webview_install_webkit(tr::now));
break;
case Error::MutterWM:
rich.append(tr::lng_payments_webview_switch_mutter(tr::now));
break;
case Error::Wayland:
rich.append(tr::lng_payments_webview_switch_wayland(tr::now));
break;
default:
rich.append(QString::fromStdString(information.details));
break;

View File

@ -679,7 +679,7 @@ ENV OPENSSL_ROOT_DIR {{ OPENSSL_PREFIX }}
RUN git clone -b {{ QT_TAG }} --depth=1 git://code.qt.io/qt/qt5.git qt_{{ QT }} \
&& cd qt_{{ QT }} \
&& git submodule update --init --recursive --depth=1 qtbase qtwayland qtimageformats qtsvg qt5compat \
&& git submodule update --init --recursive --depth=1 qtbase qtdeclarative qtwayland qtimageformats qtsvg qt5compat qtshadertools \
&& cd qtbase \
&& find ../../patches/qtbase_{{ QT }} -type f -print0 | sort -z | xargs -r0 git apply \
&& cd .. \
@ -697,7 +697,6 @@ RUN git clone -b {{ QT_TAG }} --depth=1 git://code.qt.io/qt/qt5.git qt_{{ QT }}
-no-icu \
-no-feature-xcb-sm \
-no-feature-egl-extension-platform-wayland \
-no-feature-wayland-server \
-no-feature-highdpiscaling \
-static \
-dbus-runtime \

@ -1 +1 @@
Subproject commit 1d14bb480a38b02fa93403f511076d3135d9b934
Subproject commit 6ee92c066c6b75349980670edf795990f26b2f62

2
cmake

@ -1 +1 @@
Subproject commit e8bc7cfd1d8f284ac5bc3addc5dcc7fdd6a93524
Subproject commit 36ee4977bbac6d5de4f3c463777a4e0588c661f9

View File

@ -376,6 +376,7 @@ parts:
- libwayland-client0
- libwayland-cursor0
- libwayland-egl1
- libwayland-server0
- libx11-6
- libx11-xcb1
- libxcb1
@ -400,7 +401,7 @@ parts:
QT=6_4_0
git clone -b v6.4.0 --depth=1 git://code.qt.io/qt/qt5.git .
perl init-repository --module-subset=qtbase,qtwayland,qtimageformats,qtsvg,qt5compat
git submodule update --init --recursive --depth=1 qtbase qtdeclarative qtwayland qtimageformats qtsvg qt5compat qtshadertools
cd qtbase
find $CRAFT_STAGE/patches/qtbase_${QT} -type f -print0 | sort -z | xargs -r0 git apply
@ -416,7 +417,6 @@ parts:
-no-feature-renameat2 \
-no-feature-statx \
-no-feature-egl-extension-platform-wayland \
-no-feature-wayland-server \
-no-feature-highdpiscaling \
-openssl-linked \
-nomake examples \