Use D-Bus remote on Wayland (rhbz#1817330)

This commit is contained in:
Martin Stransky 2020-05-15 12:45:02 +02:00
parent 8380483753
commit 0c083d7ada
3 changed files with 56 additions and 1 deletions

View File

@ -0,0 +1,43 @@
diff --git a/toolkit/components/remote/nsRemoteService.cpp b/toolkit/components/remote/nsRemoteService.cpp
--- a/toolkit/components/remote/nsRemoteService.cpp
+++ b/toolkit/components/remote/nsRemoteService.cpp
@@ -38,6 +38,10 @@
#define START_TIMEOUT_SEC 5
#define START_SLEEP_MSEC 100
+// When MOZ_DBUS_REMOTE is set both X11 and Wayland backends
+// use only DBus remote.
+#define DBUS_REMOTE_ENV "MOZ_DBUS_REMOTE"
+
using namespace mozilla;
extern int gArgc;
@@ -101,11 +105,11 @@
bool useX11Remote = GDK_IS_X11_DISPLAY(gdk_display_get_default());
# if defined(MOZ_ENABLE_DBUS)
- if (!useX11Remote) {
+ if (!useX11Remote || getenv(DBUS_REMOTE_ENV)) {
client = new nsDBusRemoteClient();
}
# endif
- if (useX11Remote) {
+ if (!client && useX11Remote) {
client = new nsXRemoteClient();
}
#elif defined(XP_WIN)
@@ -150,11 +154,11 @@
bool useX11Remote = GDK_IS_X11_DISPLAY(gdk_display_get_default());
# if defined(MOZ_ENABLE_DBUS)
- if (!useX11Remote) {
+ if (!useX11Remote || getenv(DBUS_REMOTE_ENV)) {
mRemoteServer = MakeUnique<nsDBusRemoteServer>();
}
# endif
- if (useX11Remote) {
+ if (!mRemoteServer && useX11Remote) {
mRemoteServer = MakeUnique<nsGTKRemoteServer>();
}
#elif defined(XP_WIN)

View File

@ -74,6 +74,13 @@ export MOZ_ALLOW_DOWNGRADE=1
# export MOZ_DISABLE_LANGPACKS
#
##
## Use D-Bus remote exclusively when there's Wayland display.
##
if [ "$WAYLAND_DISPLAY" ]; then
export MOZ_DBUS_REMOTE=1
fi
##
## Automatically installed langpacks are tracked by .fedora-langpack-install
## config file.

View File

@ -94,7 +94,7 @@ ExcludeArch: s390x
Summary: Mozilla Thunderbird mail/newsgroup client
Name: thunderbird
Version: 68.8.0
Release: 1%{?dist}
Release: 2%{?dist}
URL: http://www.mozilla.org/projects/thunderbird/
License: MPLv1.1 or GPLv2+ or LGPLv2+
Source0: ftp://ftp.mozilla.org/pub/thunderbird/releases/%{version}%{?pre_version}/source/thunderbird-%{version}%{?pre_version}.source.tar.xz
@ -139,6 +139,7 @@ Patch307: build-disable-elfhack.patch
# Upstream patches
Patch402: mozilla-526293.patch
Patch403: mozilla-1576268.patch
Patch404: thunderbird-dbus-remote.patch
%if %{official_branding}
# Required by Mozilla Corporation
@ -285,6 +286,7 @@ debug %{name}, you want to install %{name}-debuginfo instead.
%patch402 -p1 -b .526293
%patch403 -p1 -b .1576268
%patch404 -p1 -b .thunderbird-dbus-remote
%if %{official_branding}
# Required by Mozilla Corporation
@ -759,6 +761,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
#===============================================================================
%changelog
* Fri May 15 2020 Martin Stransky <stransky@redhat.com> - 68.8.0-2
- Use D-Bus remote on Wayland (rhbz#1817330).
* Thu May 14 2020 Jan Horak <jhorak@redhat.com> - 68.8.0-1
- Update to 68.8.0 build2