Merge branch 'master' into f28

This commit is contained in:
Martin Stransky 2018-12-05 13:21:51 +01:00
commit f1e9eb9db5
9 changed files with 189 additions and 526 deletions

2
.gitignore vendored
View File

@ -319,3 +319,5 @@ firefox-3.6.4.source.tar.bz2
/firefox-63.0.1.source.tar.xz /firefox-63.0.1.source.tar.xz
/firefox-63.0.3.source.tar.xz /firefox-63.0.3.source.tar.xz
/firefox-langpacks-63.0.3-20181115.tar.xz /firefox-langpacks-63.0.3-20181115.tar.xz
/firefox-64.0.source.tar.xz
/firefox-langpacks-64.0-20181204.tar.xz

View File

@ -1,12 +0,0 @@
diff -up firefox-63.0.1/widget/gtk/nsClipboardWayland.cpp.old firefox-63.0.1/widget/gtk/nsClipboardWayland.cpp
--- firefox-63.0.1/widget/gtk/nsClipboardWayland.cpp.old 2018-11-14 10:26:47.602412372 +0100
+++ firefox-63.0.1/widget/gtk/nsClipboardWayland.cpp 2018-11-14 10:27:27.847245617 +0100
@@ -153,7 +153,7 @@ DataOffer::GetData(wl_display* aDisplay,
GIOChannel *channel = g_io_channel_unix_new(pipe_fd[0]);
GError* error = nullptr;
- char* clipboardData;
+ char* clipboardData = nullptr;
g_io_channel_set_encoding(channel, nullptr, &error);
if (!error) {

View File

@ -5,7 +5,6 @@ ac_add_options --libdir="$LIBDIR"
ac_add_options --with-system-zlib ac_add_options --with-system-zlib
ac_add_options --with-system-bz2 ac_add_options --with-system-bz2
ac_add_options --disable-strip ac_add_options --disable-strip
ac_add_options --disable-tests
#ac_add_options --enable-libnotify #ac_add_options --enable-libnotify
ac_add_options --enable-necko-wifi ac_add_options --enable-necko-wifi
ac_add_options --enable-startup-notification ac_add_options --enable-startup-notification
@ -15,7 +14,6 @@ ac_add_options --enable-pulseaudio
ac_add_options --with-system-icu ac_add_options --with-system-icu
ac_add_options --with-mozilla-api-keyfile=../mozilla-api-key ac_add_options --with-mozilla-api-keyfile=../mozilla-api-key
ac_add_options --with-google-api-keyfile=../google-api-key ac_add_options --with-google-api-keyfile=../google-api-key
ac_add_options --enable-pie
ac_add_options --enable-release ac_add_options --enable-release
ac_add_options --update-channel=release ac_add_options --update-channel=release
# Workaround for mozbz#1341234 # Workaround for mozbz#1341234

View File

@ -1,13 +1,6 @@
>From 4709953855a4243ce2d2ec45f63059baf604a499 Mon Sep 17 00:00:00 2001 diff -up firefox-64.0/config/system-headers.mozbuild.firefox-pipewire firefox-64.0/config/system-headers.mozbuild
From: Jan Grulich <jgrulich@redhat.com> --- firefox-64.0/config/system-headers.mozbuild.firefox-pipewire 2018-12-04 00:34:00.000000000 +0100
Date: Thu, 18 Oct 2018 10:25:56 +0200 +++ firefox-64.0/config/system-headers.mozbuild 2018-12-05 13:04:08.828063572 +0100
Subject: PW support
diff --git a/config/system-headers.mozbuild b/config/system-headers.mozbuild
index 60967bd51..11eb07a65 100644
--- a/config/system-headers.mozbuild
+++ b/config/system-headers.mozbuild
@@ -314,6 +314,7 @@ system_headers = [ @@ -314,6 +314,7 @@ system_headers = [
'Gestalt.h', 'Gestalt.h',
'getopt.h', 'getopt.h',
@ -24,23 +17,9 @@ index 60967bd51..11eb07a65 100644
'pixman.h', 'pixman.h',
'pk11func.h', 'pk11func.h',
'pk11pqg.h', 'pk11pqg.h',
diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/BUILD.gn b/media/webrtc/trunk/webrtc/modules/desktop_capture/BUILD.gn diff -up firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/app_capturer_linux.cc.firefox-pipewire firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/app_capturer_linux.cc
index ed12a1521..a9e700ccd 100644 --- firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/app_capturer_linux.cc.firefox-pipewire 2018-12-05 13:04:08.828063572 +0100
--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/BUILD.gn +++ firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/app_capturer_linux.cc 2018-12-05 13:04:08.828063572 +0100
+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/BUILD.gn
@@ -213,7 +213,6 @@ rtc_static_library("desktop_capture") {
if (build_with_mozilla) {
sources += [
"app_capturer_x11.cc",
- "app_capturer_x11.h",
"x11/desktop_device_info_x11.cc",
"x11/desktop_device_info_x11.h",
"x11/shared_x_util.cc",
diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/app_capturer_linux.cc b/media/webrtc/trunk/webrtc/modules/desktop_capture/app_capturer_linux.cc
new file mode 100644
index 000000000..4ac35aa84
--- /dev/null
+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/app_capturer_linux.cc
@@ -0,0 +1,55 @@ @@ -0,0 +1,55 @@
+/* +/*
+ * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
@ -97,10 +76,9 @@ index 000000000..4ac35aa84
+} +}
+ +
+} // namespace webrtc +} // namespace webrtc
diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/app_capturer_null.cc b/media/webrtc/trunk/webrtc/modules/desktop_capture/app_capturer_null.cc diff -up firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/app_capturer_null.cc.firefox-pipewire firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/app_capturer_null.cc
index 5a0b1a28f..84a7e5951 100644 --- firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/app_capturer_null.cc.firefox-pipewire 2018-12-04 00:34:15.000000000 +0100
--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/app_capturer_null.cc +++ firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/app_capturer_null.cc 2018-12-05 13:04:08.829063566 +0100
+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/app_capturer_null.cc
@@ -7,8 +7,8 @@ @@ -7,8 +7,8 @@
* in the file PATENTS. All contributing project authors may * in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
@ -126,7 +104,7 @@ index 5a0b1a28f..84a7e5951 100644
private: private:
Callback* callback_; Callback* callback_;
@@ -61,7 +63,16 @@ bool AppCapturerNull::BringAppToFront() { @@ -61,7 +63,16 @@ bool AppCapturerNull::BringAppToFront()
return false; return false;
} }
@ -169,10 +147,9 @@ index 5a0b1a28f..84a7e5951 100644
+#endif // not defined(USE_PIPEWIRE) +#endif // not defined(USE_PIPEWIRE)
} // namespace webrtc } // namespace webrtc
diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/app_capturer_x11.cc b/media/webrtc/trunk/webrtc/modules/desktop_capture/app_capturer_x11.cc diff -up firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/app_capturer_x11.cc.firefox-pipewire firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/app_capturer_x11.cc
index 821582367..5c20ed0a5 100755 --- firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/app_capturer_x11.cc.firefox-pipewire 2018-12-04 00:34:14.000000000 +0100
--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/app_capturer_x11.cc +++ firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/app_capturer_x11.cc 2018-12-05 13:04:08.829063566 +0100
+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/app_capturer_x11.cc
@@ -53,10 +53,13 @@ protected: @@ -53,10 +53,13 @@ protected:
std::unique_ptr<DesktopFrame> frame_; std::unique_ptr<DesktopFrame> frame_;
}; };
@ -203,7 +180,7 @@ index 821582367..5c20ed0a5 100755
: callback_(NULL), : callback_(NULL),
selected_process_(0), selected_process_(0),
x_display_(options.x_display()) { x_display_(options.x_display()) {
@@ -103,7 +105,7 @@ AppCapturerLinux::AppCapturerLinux(const DesktopCaptureOptions& options) @@ -103,7 +105,7 @@ AppCapturerLinux::AppCapturerLinux(const
rgn_background_ = XCreateRegion(); rgn_background_ = XCreateRegion();
} }
@ -260,7 +237,7 @@ index 821582367..5c20ed0a5 100755
XErrorTrap error_trap(GetDisplay()); XErrorTrap error_trap(GetDisplay());
if (!pDesktopFrame) { if (!pDesktopFrame) {
@@ -192,7 +194,7 @@ void AppCapturerLinux::FillDesktopFrameRegionWithColor(DesktopFrame* pDesktopFra @@ -192,7 +194,7 @@ void AppCapturerLinux::FillDesktopFrameR
} }
} }
@ -292,11 +269,9 @@ index 821582367..5c20ed0a5 100755
return std::unique_ptr<DesktopCapturer>(std::move(capturer)); return std::unique_ptr<DesktopCapturer>(std::move(capturer));
} }
diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/base_capturer_pipewire.cc b/media/webrtc/trunk/webrtc/modules/desktop_capture/base_capturer_pipewire.cc diff -up firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/base_capturer_pipewire.cc.firefox-pipewire firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/base_capturer_pipewire.cc
new file mode 100644 --- firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/base_capturer_pipewire.cc.firefox-pipewire 2018-12-05 13:04:08.832063551 +0100
index 000000000..39c19164d +++ firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/base_capturer_pipewire.cc 2018-12-05 13:04:08.832063551 +0100
--- /dev/null
+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/base_capturer_pipewire.cc
@@ -0,0 +1,849 @@ @@ -0,0 +1,849 @@
+/* +/*
+ * Copyright 2018 The WebRTC project authors. All Rights Reserved. + * Copyright 2018 The WebRTC project authors. All Rights Reserved.
@ -1147,11 +1122,9 @@ index 000000000..39c19164d
+} +}
+ +
+} // namespace webrtc +} // namespace webrtc
diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/base_capturer_pipewire.h b/media/webrtc/trunk/webrtc/modules/desktop_capture/base_capturer_pipewire.h diff -up firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/base_capturer_pipewire.h.firefox-pipewire firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/base_capturer_pipewire.h
new file mode 100644 --- firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/base_capturer_pipewire.h.firefox-pipewire 2018-12-05 13:04:08.832063551 +0100
index 000000000..4577ddf6b +++ firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/base_capturer_pipewire.h 2018-12-05 13:04:08.832063551 +0100
--- /dev/null
+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/base_capturer_pipewire.h
@@ -0,0 +1,167 @@ @@ -0,0 +1,167 @@
+/* +/*
+ * Copyright 2018 The WebRTC project authors. All Rights Reserved. + * Copyright 2018 The WebRTC project authors. All Rights Reserved.
@ -1320,65 +1293,74 @@ index 000000000..4577ddf6b
+} // namespace webrtc +} // namespace webrtc
+ +
+#endif // MODULES_DESKTOP_CAPTURE_LINUX_BASE_CAPTURER_PIPEWIRE_H_ +#endif // MODULES_DESKTOP_CAPTURE_LINUX_BASE_CAPTURER_PIPEWIRE_H_
diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_gn/moz.build b/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_gn/moz.build diff -up firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/BUILD.gn.firefox-pipewire firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/BUILD.gn
index ea1726a51..d72fe8161 100644 --- firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/BUILD.gn.firefox-pipewire 2018-12-04 00:34:14.000000000 +0100
--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_gn/moz.build +++ firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/BUILD.gn 2018-12-05 13:04:08.828063572 +0100
+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_gn/moz.build @@ -213,7 +213,6 @@ rtc_static_library("desktop_capture") {
@@ -166,10 +166,6 @@ if CONFIG["OS_TARGET"] == "Linux": if (build_with_mozilla) {
] sources += [
"app_capturer_x11.cc",
UNIFIED_SOURCES += [ - "app_capturer_x11.h",
- "/media/webrtc/trunk/webrtc/modules/desktop_capture/app_capturer_x11.cc", "x11/desktop_device_info_x11.cc",
- "/media/webrtc/trunk/webrtc/modules/desktop_capture/mouse_cursor_monitor_x11.cc", "x11/desktop_device_info_x11.h",
- "/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_x11.cc", "x11/shared_x_util.cc",
- "/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_x11.cc", diff -up firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_gn/moz.build.firefox-pipewire firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_gn/moz.build
"/media/webrtc/trunk/webrtc/modules/desktop_capture/x11/desktop_device_info_x11.cc", --- firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_gn/moz.build.firefox-pipewire 2018-12-05 13:04:08.832063551 +0100
"/media/webrtc/trunk/webrtc/modules/desktop_capture/x11/shared_x_display.cc", +++ firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_gn/moz.build 2018-12-05 13:12:40.063396138 +0100
"/media/webrtc/trunk/webrtc/modules/desktop_capture/x11/shared_x_util.cc", @@ -100,10 +100,6 @@ if CONFIG["OS_TARGET"] == "DragonFly":
@@ -177,6 +173,38 @@ if CONFIG["OS_TARGET"] == "Linux": ]
"/media/webrtc/trunk/webrtc/modules/desktop_capture/x11/x_server_pixel_buffer.cc"
] UNIFIED_SOURCES += [
- "/media/webrtc/trunk/webrtc/modules/desktop_capture/app_capturer_x11.cc",
+# Common stuff between Pipewire and X11 - "/media/webrtc/trunk/webrtc/modules/desktop_capture/mouse_cursor_monitor_x11.cc",
+if CONFIG["OS_TARGET"] == "Linux": - "/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_x11.cc",
+ - "/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_x11.cc",
+ UNIFIED_SOURCES += [ "/media/webrtc/trunk/webrtc/modules/desktop_capture/x11/desktop_device_info_x11.cc",
+ "/media/webrtc/trunk/webrtc/modules/desktop_capture/app_capturer_linux.cc", "/media/webrtc/trunk/webrtc/modules/desktop_capture/x11/shared_x_display.cc",
+ "/media/webrtc/trunk/webrtc/modules/desktop_capture/base_capturer_pipewire.cc", "/media/webrtc/trunk/webrtc/modules/desktop_capture/x11/shared_x_util.cc",
+ "/media/webrtc/trunk/webrtc/modules/desktop_capture/mouse_cursor_monitor_linux.cc", @@ -111,6 +107,38 @@ if CONFIG["OS_TARGET"] == "DragonFly":
+ "/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_linux.cc", "/media/webrtc/trunk/webrtc/modules/desktop_capture/x11/x_server_pixel_buffer.cc"
+ "/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_pipewire.cc", ]
+ "/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_linux.cc",
+ "/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_pipewire.cc", +# Common stuff between Pipewire and X11
+ ] +if CONFIG["OS_TARGET"] == "Linux":
+ +
+# Pipewire + UNIFIED_SOURCES += [
+if CONFIG["OS_TARGET"] == "Linux": + "/media/webrtc/trunk/webrtc/modules/desktop_capture/app_capturer_linux.cc",
+ + "/media/webrtc/trunk/webrtc/modules/desktop_capture/base_capturer_pipewire.cc",
+ DEFINES["USE_PIPEWIRE"] = "1" + "/media/webrtc/trunk/webrtc/modules/desktop_capture/mouse_cursor_monitor_linux.cc",
+ + "/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_linux.cc",
+ OS_LIBS += [ + "/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_pipewire.cc",
+ "rt", + "/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_linux.cc",
+ "pipewire-0.2", + "/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_pipewire.cc",
+ "glib-2.0", + ]
+ "gio-2.0", +
+ "gobject-2.0" +# Pipewire
+ ] +if CONFIG["OS_TARGET"] == "Linux":
+ +
+ CXXFLAGS += CONFIG['TK_CFLAGS'] + DEFINES["USE_PIPEWIRE"] = "1"
+ +
+ UNIFIED_SOURCES += [ + OS_LIBS += [
+ "/media/webrtc/trunk/webrtc/modules/desktop_capture/mouse_cursor_monitor_null.cc" + "rt",
+ ] + "pipewire-0.2",
+ + "glib-2.0",
if CONFIG["OS_TARGET"] == "NetBSD": + "gio-2.0",
+ "gobject-2.0"
DEFINES["USE_X11"] = "1" + ]
diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capturer.cc b/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capturer.cc +
index 7510bde47..9dab1eb50 100644 + CXXFLAGS += CONFIG['TK_CFLAGS']
--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capturer.cc +
+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capturer.cc + UNIFIED_SOURCES += [
@@ -66,4 +66,17 @@ std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateAppCapturer( + "/media/webrtc/trunk/webrtc/modules/desktop_capture/mouse_cursor_monitor_null.cc"
+ ]
+
if CONFIG["OS_TARGET"] == "FreeBSD":
DEFINES["USE_X11"] = "1"
diff -up firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capturer.cc.firefox-pipewire firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capturer.cc
--- firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capturer.cc.firefox-pipewire 2018-12-04 00:34:14.000000000 +0100
+++ firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capturer.cc 2018-12-05 13:04:08.832063551 +0100
@@ -66,4 +66,17 @@ std::unique_ptr<DesktopCapturer> Desktop
return capturer; return capturer;
} }
@ -1396,10 +1378,9 @@ index 7510bde47..9dab1eb50 100644
+#endif +#endif
+ +
} // namespace webrtc } // namespace webrtc
diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capturer.h b/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capturer.h diff -up firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capturer.h.firefox-pipewire firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capturer.h
index eb84d3c3b..17cacc5dc 100644 --- firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capturer.h.firefox-pipewire 2018-12-04 00:34:14.000000000 +0100
--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capturer.h +++ firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capturer.h 2018-12-05 13:04:08.832063551 +0100
+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capturer.h
@@ -129,6 +129,10 @@ class DesktopCapturer { @@ -129,6 +129,10 @@ class DesktopCapturer {
static std::unique_ptr<DesktopCapturer> CreateAppCapturer( static std::unique_ptr<DesktopCapturer> CreateAppCapturer(
const DesktopCaptureOptions& options); const DesktopCaptureOptions& options);
@ -1411,11 +1392,9 @@ index eb84d3c3b..17cacc5dc 100644
protected: protected:
// CroppingWindowCapturer needs to create raw capturers without wrappers, so // CroppingWindowCapturer needs to create raw capturers without wrappers, so
// the following two functions are protected. // the following two functions are protected.
diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/mouse_cursor_monitor_linux.cc b/media/webrtc/trunk/webrtc/modules/desktop_capture/mouse_cursor_monitor_linux.cc diff -up firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/mouse_cursor_monitor_linux.cc.firefox-pipewire firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/mouse_cursor_monitor_linux.cc
new file mode 100644 --- firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/mouse_cursor_monitor_linux.cc.firefox-pipewire 2018-12-05 13:04:08.832063551 +0100
index 000000000..f7aaf3dcd +++ firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/mouse_cursor_monitor_linux.cc 2018-12-05 13:04:08.832063551 +0100
--- /dev/null
+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/mouse_cursor_monitor_linux.cc
@@ -0,0 +1,44 @@ @@ -0,0 +1,44 @@
+/* +/*
+ * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. + * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
@ -1461,10 +1440,9 @@ index 000000000..f7aaf3dcd
+} +}
+ +
+} // namespace webrtc +} // namespace webrtc
diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/mouse_cursor_monitor_null.cc b/media/webrtc/trunk/webrtc/modules/desktop_capture/mouse_cursor_monitor_null.cc diff -up firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/mouse_cursor_monitor_null.cc.firefox-pipewire firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/mouse_cursor_monitor_null.cc
index 3a632cc0d..b70b4e256 100644 --- firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/mouse_cursor_monitor_null.cc.firefox-pipewire 2018-12-04 00:34:15.000000000 +0100
--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/mouse_cursor_monitor_null.cc +++ firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/mouse_cursor_monitor_null.cc 2018-12-05 13:04:08.832063551 +0100
+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/mouse_cursor_monitor_null.cc
@@ -14,6 +14,7 @@ @@ -14,6 +14,7 @@
namespace webrtc { namespace webrtc {
@ -1473,18 +1451,17 @@ index 3a632cc0d..b70b4e256 100644
MouseCursorMonitor* MouseCursorMonitor::CreateForWindow( MouseCursorMonitor* MouseCursorMonitor::CreateForWindow(
const DesktopCaptureOptions& options, const DesktopCaptureOptions& options,
WindowId window) { WindowId window) {
@@ -25,5 +26,6 @@ MouseCursorMonitor* MouseCursorMonitor::CreateForScreen( @@ -25,5 +26,6 @@ MouseCursorMonitor* MouseCursorMonitor::
ScreenId screen) { ScreenId screen) {
return NULL; return NULL;
} }
+#endif // not defined(USE_PIPEWIRE) +#endif // not defined(USE_PIPEWIRE)
} // namespace webrtc } // namespace webrtc
diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/mouse_cursor_monitor_x11.cc b/media/webrtc/trunk/webrtc/modules/desktop_capture/mouse_cursor_monitor_x11.cc diff -up firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/mouse_cursor_monitor_x11.cc.firefox-pipewire firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/mouse_cursor_monitor_x11.cc
index 2dcad5b38..a8397f1ec 100644 --- firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/mouse_cursor_monitor_x11.cc.firefox-pipewire 2018-12-04 00:34:14.000000000 +0100
--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/mouse_cursor_monitor_x11.cc +++ firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/mouse_cursor_monitor_x11.cc 2018-12-05 13:04:08.832063551 +0100
+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/mouse_cursor_monitor_x11.cc @@ -69,6 +69,9 @@ class MouseCursorMonitorX11 : public Mou
@@ -69,6 +69,9 @@ class MouseCursorMonitorX11 : public MouseCursorMonitor,
void Stop() override; void Stop() override;
void Capture() override; void Capture() override;
@ -1494,7 +1471,7 @@ index 2dcad5b38..a8397f1ec 100644
private: private:
// SharedXDisplay::XEventHandler interface. // SharedXDisplay::XEventHandler interface.
bool HandleXEvent(const XEvent& event) override; bool HandleXEvent(const XEvent& event) override;
@@ -244,7 +247,7 @@ void MouseCursorMonitorX11::CaptureCursor() { @@ -244,7 +247,7 @@ void MouseCursorMonitorX11::CaptureCurso
} }
// static // static
@ -1503,7 +1480,7 @@ index 2dcad5b38..a8397f1ec 100644
const DesktopCaptureOptions& options, WindowId window) { const DesktopCaptureOptions& options, WindowId window) {
if (!options.x_display()) if (!options.x_display())
return NULL; return NULL;
@@ -254,7 +257,7 @@ MouseCursorMonitor* MouseCursorMonitor::CreateForWindow( @@ -254,7 +257,7 @@ MouseCursorMonitor* MouseCursorMonitor::
return new MouseCursorMonitorX11(options, outer_window, window); return new MouseCursorMonitorX11(options, outer_window, window);
} }
@ -1512,11 +1489,9 @@ index 2dcad5b38..a8397f1ec 100644
const DesktopCaptureOptions& options, const DesktopCaptureOptions& options,
ScreenId screen) { ScreenId screen) {
if (!options.x_display()) if (!options.x_display())
diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_linux.cc b/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_linux.cc diff -up firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_linux.cc.firefox-pipewire firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_linux.cc
new file mode 100644 --- firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_linux.cc.firefox-pipewire 2018-12-05 13:04:08.833063546 +0100
index 000000000..43c4098e2 +++ firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_linux.cc 2018-12-05 13:04:08.833063546 +0100
--- /dev/null
+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_linux.cc
@@ -0,0 +1,40 @@ @@ -0,0 +1,40 @@
+/* +/*
+ * Copyright 2018 The WebRTC project authors. All Rights Reserved. + * Copyright 2018 The WebRTC project authors. All Rights Reserved.
@ -1558,11 +1533,9 @@ index 000000000..43c4098e2
+} +}
+ +
+} // namespace webrtc +} // namespace webrtc
diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_pipewire.cc b/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_pipewire.cc diff -up firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_pipewire.cc.firefox-pipewire firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_pipewire.cc
new file mode 100644 --- firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_pipewire.cc.firefox-pipewire 2018-12-05 13:04:08.833063546 +0100
index 000000000..b506c562f +++ firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_pipewire.cc 2018-12-05 13:04:08.833063546 +0100
--- /dev/null
+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_pipewire.cc
@@ -0,0 +1,31 @@ @@ -0,0 +1,31 @@
+/* +/*
+ * Copyright 2018 The WebRTC project authors. All Rights Reserved. + * Copyright 2018 The WebRTC project authors. All Rights Reserved.
@ -1595,11 +1568,9 @@ index 000000000..b506c562f
+} +}
+ +
+} // namespace webrtc +} // namespace webrtc
diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_pipewire.h b/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_pipewire.h diff -up firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_pipewire.h.firefox-pipewire firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_pipewire.h
new file mode 100644 --- firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_pipewire.h.firefox-pipewire 2018-12-05 13:04:08.833063546 +0100
index 000000000..23cc3a53d +++ firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_pipewire.h 2018-12-05 13:04:08.833063546 +0100
--- /dev/null
+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_pipewire.h
@@ -0,0 +1,33 @@ @@ -0,0 +1,33 @@
+/* +/*
+ * Copyright 2018 The WebRTC project authors. All Rights Reserved. + * Copyright 2018 The WebRTC project authors. All Rights Reserved.
@ -1634,10 +1605,9 @@ index 000000000..23cc3a53d
+} // namespace webrtc +} // namespace webrtc
+ +
+#endif // MODULES_DESKTOP_CAPTURE_LINUX_SCREEN_CAPTURER_PIPEWIRE_H_ +#endif // MODULES_DESKTOP_CAPTURE_LINUX_SCREEN_CAPTURER_PIPEWIRE_H_
diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_x11.cc b/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_x11.cc diff -up firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_x11.cc.firefox-pipewire firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_x11.cc
index 7692f8b70..ba1378534 100644 --- firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_x11.cc.firefox-pipewire 2018-12-04 00:34:14.000000000 +0100
--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_x11.cc +++ firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_x11.cc 2018-12-05 13:04:08.833063546 +0100
+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/screen_capturer_x11.cc
@@ -34,18 +34,20 @@ @@ -34,18 +34,20 @@
namespace webrtc { namespace webrtc {
namespace { namespace {
@ -1663,7 +1633,7 @@ index 7692f8b70..ba1378534 100644
// TODO(ajwong): Do we really want this to be synchronous? // TODO(ajwong): Do we really want this to be synchronous?
bool Init(const DesktopCaptureOptions& options); bool Init(const DesktopCaptureOptions& options);
@@ -118,14 +120,13 @@ class ScreenCapturerLinux : public DesktopCapturer, @@ -118,14 +120,13 @@ class ScreenCapturerLinux : public Deskt
// current with the last buffer used. // current with the last buffer used.
DesktopRegion last_invalid_region_; DesktopRegion last_invalid_region_;
@ -1681,7 +1651,7 @@ index 7692f8b70..ba1378534 100644
options_.x_display()->RemoveEventHandler(ConfigureNotify, this); options_.x_display()->RemoveEventHandler(ConfigureNotify, this);
if (use_damage_) { if (use_damage_) {
options_.x_display()->RemoveEventHandler( options_.x_display()->RemoveEventHandler(
@@ -134,7 +135,7 @@ ScreenCapturerLinux::~ScreenCapturerLinux() { @@ -134,7 +135,7 @@ ScreenCapturerLinux::~ScreenCapturerLinu
DeinitXlib(); DeinitXlib();
} }
@ -1690,7 +1660,7 @@ index 7692f8b70..ba1378534 100644
options_ = options; options_ = options;
root_window_ = RootWindow(display(), DefaultScreen(display())); root_window_ = RootWindow(display(), DefaultScreen(display()));
@@ -177,7 +178,7 @@ bool ScreenCapturerLinux::Init(const DesktopCaptureOptions& options) { @@ -177,7 +178,7 @@ bool ScreenCapturerLinux::Init(const Des
return true; return true;
} }
@ -1699,7 +1669,7 @@ index 7692f8b70..ba1378534 100644
// Our use of XDamage requires XFixes. // Our use of XDamage requires XFixes.
if (!has_xfixes_) { if (!has_xfixes_) {
return; return;
@@ -218,18 +219,18 @@ void ScreenCapturerLinux::InitXDamage() { @@ -218,18 +219,18 @@ void ScreenCapturerLinux::InitXDamage()
LOG(LS_INFO) << "Using XDamage extension."; LOG(LS_INFO) << "Using XDamage extension.";
} }
@ -1721,7 +1691,7 @@ index 7692f8b70..ba1378534 100644
int64_t capture_start_time_nanos = rtc::TimeNanos(); int64_t capture_start_time_nanos = rtc::TimeNanos();
queue_.MoveToNextFrame(); queue_.MoveToNextFrame();
@@ -243,6 +244,7 @@ void ScreenCapturerLinux::CaptureFrame() { @@ -243,6 +244,7 @@ void ScreenCapturerLinux::CaptureFrame()
// in a good shape. // in a good shape.
if (!x_server_pixel_buffer_.is_initialized()) { if (!x_server_pixel_buffer_.is_initialized()) {
// We failed to initialize pixel buffer. // We failed to initialize pixel buffer.
@ -1729,7 +1699,7 @@ index 7692f8b70..ba1378534 100644
callback_->OnCaptureResult(Result::ERROR_PERMANENT, nullptr); callback_->OnCaptureResult(Result::ERROR_PERMANENT, nullptr);
return; return;
} }
@@ -258,6 +260,7 @@ void ScreenCapturerLinux::CaptureFrame() { @@ -258,6 +260,7 @@ void ScreenCapturerLinux::CaptureFrame()
std::unique_ptr<DesktopFrame> result = CaptureScreen(); std::unique_ptr<DesktopFrame> result = CaptureScreen();
if (!result) { if (!result) {
@ -1737,7 +1707,7 @@ index 7692f8b70..ba1378534 100644
callback_->OnCaptureResult(Result::ERROR_TEMPORARY, nullptr); callback_->OnCaptureResult(Result::ERROR_TEMPORARY, nullptr);
return; return;
} }
@@ -268,19 +271,19 @@ void ScreenCapturerLinux::CaptureFrame() { @@ -268,19 +271,19 @@ void ScreenCapturerLinux::CaptureFrame()
callback_->OnCaptureResult(Result::SUCCESS, std::move(result)); callback_->OnCaptureResult(Result::SUCCESS, std::move(result));
} }
@ -1760,7 +1730,7 @@ index 7692f8b70..ba1378534 100644
if (use_damage_ && (event.type == damage_event_base_ + XDamageNotify)) { if (use_damage_ && (event.type == damage_event_base_ + XDamageNotify)) {
const XDamageNotifyEvent* damage_event = const XDamageNotifyEvent* damage_event =
reinterpret_cast<const XDamageNotifyEvent*>(&event); reinterpret_cast<const XDamageNotifyEvent*>(&event);
@@ -295,7 +298,7 @@ bool ScreenCapturerLinux::HandleXEvent(const XEvent& event) { @@ -295,7 +298,7 @@ bool ScreenCapturerLinux::HandleXEvent(c
return false; return false;
} }
@ -1769,7 +1739,7 @@ index 7692f8b70..ba1378534 100644
std::unique_ptr<SharedDesktopFrame> frame = queue_.current_frame()->Share(); std::unique_ptr<SharedDesktopFrame> frame = queue_.current_frame()->Share();
RTC_DCHECK(x_server_pixel_buffer_.window_size().equals(frame->size())); RTC_DCHECK(x_server_pixel_buffer_.window_size().equals(frame->size()));
@@ -345,25 +348,26 @@ std::unique_ptr<DesktopFrame> ScreenCapturerLinux::CaptureScreen() { @@ -345,25 +348,26 @@ std::unique_ptr<DesktopFrame> ScreenCapt
// Doing full-screen polling, or this is the first capture after a // Doing full-screen polling, or this is the first capture after a
// screen-resolution change. In either case, need a full-screen capture. // screen-resolution change. In either case, need a full-screen capture.
DesktopRect screen_rect = DesktopRect::MakeSize(frame->size()); DesktopRect screen_rect = DesktopRect::MakeSize(frame->size());
@ -1800,7 +1770,7 @@ index 7692f8b70..ba1378534 100644
// Synchronize the current buffer with the previous one since we do not // Synchronize the current buffer with the previous one since we do not
// capture the entire desktop. Note that encoder may be reading from the // capture the entire desktop. Note that encoder may be reading from the
// previous buffer at this time so thread access complaints are false // previous buffer at this time so thread access complaints are false
@@ -383,7 +387,7 @@ void ScreenCapturerLinux::SynchronizeFrame() { @@ -383,7 +387,7 @@ void ScreenCapturerLinux::SynchronizeFra
} }
} }
@ -1830,11 +1800,9 @@ index 7692f8b70..ba1378534 100644
} }
} // namespace webrtc } // namespace webrtc
diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_linux.cc b/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_linux.cc diff -up firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_linux.cc.firefox-pipewire firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_linux.cc
new file mode 100644 --- firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_linux.cc.firefox-pipewire 2018-12-05 13:04:08.833063546 +0100
index 000000000..284ccdb7b +++ firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_linux.cc 2018-12-05 13:04:08.833063546 +0100
--- /dev/null
+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_linux.cc
@@ -0,0 +1,40 @@ @@ -0,0 +1,40 @@
+/* +/*
+ * Copyright 2018 The WebRTC project authors. All Rights Reserved. + * Copyright 2018 The WebRTC project authors. All Rights Reserved.
@ -1876,11 +1844,10 @@ index 000000000..284ccdb7b
+} +}
+ +
+} // namespace webrtc +} // namespace webrtc
diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_null.cc b/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_null.cc diff -up firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_null.cc.firefox-pipewire firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_null.cc
index 0f0159bb5..f6ef0639a 100755 --- firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_null.cc.firefox-pipewire 2018-12-04 00:34:14.000000000 +0100
--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_null.cc +++ firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_null.cc 2018-12-05 13:04:08.833063546 +0100
+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_null.cc @@ -67,10 +67,12 @@ void WindowCapturerNull::CaptureFrame()
@@ -67,10 +67,12 @@ void WindowCapturerNull::CaptureFrame() {
} // namespace } // namespace
@ -1893,11 +1860,9 @@ index 0f0159bb5..f6ef0639a 100755
+#endif // not defined(USE_PIPEWIRE) +#endif // not defined(USE_PIPEWIRE)
} // namespace webrtc } // namespace webrtc
diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_pipewire.cc b/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_pipewire.cc diff -up firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_pipewire.cc.firefox-pipewire firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_pipewire.cc
new file mode 100644 --- firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_pipewire.cc.firefox-pipewire 2018-12-05 13:04:08.833063546 +0100
index 000000000..4f97e6ac2 +++ firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_pipewire.cc 2018-12-05 13:04:08.833063546 +0100
--- /dev/null
+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_pipewire.cc
@@ -0,0 +1,28 @@ @@ -0,0 +1,28 @@
+/* +/*
+ * Copyright 2018 The WebRTC project authors. All Rights Reserved. + * Copyright 2018 The WebRTC project authors. All Rights Reserved.
@ -1927,11 +1892,9 @@ index 000000000..4f97e6ac2
+ return std::move(capturer); + return std::move(capturer);
+} +}
+} // namespace webrtc +} // namespace webrtc
diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_pipewire.h b/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_pipewire.h diff -up firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_pipewire.h.firefox-pipewire firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_pipewire.h
new file mode 100644 --- firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_pipewire.h.firefox-pipewire 2018-12-05 13:04:08.833063546 +0100
index 000000000..e04bc7151 +++ firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_pipewire.h 2018-12-05 13:04:08.833063546 +0100
--- /dev/null
+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_pipewire.h
@@ -0,0 +1,33 @@ @@ -0,0 +1,33 @@
+/* +/*
+ * Copyright 2018 The WebRTC project authors. All Rights Reserved. + * Copyright 2018 The WebRTC project authors. All Rights Reserved.
@ -1966,10 +1929,9 @@ index 000000000..e04bc7151
+} // namespace webrtc +} // namespace webrtc
+ +
+#endif // MODULES_DESKTOP_CAPTURE_LINUX_WINDOW_CAPTURER_PIPEWIRE_H_ +#endif // MODULES_DESKTOP_CAPTURE_LINUX_WINDOW_CAPTURER_PIPEWIRE_H_
diff --git a/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_x11.cc b/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_x11.cc diff -up firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_x11.cc.firefox-pipewire firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_x11.cc
index fecb329db..d478604aa 100644 --- firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_x11.cc.firefox-pipewire 2018-12-04 00:34:14.000000000 +0100
--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_x11.cc +++ firefox-64.0/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_x11.cc 2018-12-05 13:04:08.833063546 +0100
+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/window_capturer_x11.cc
@@ -32,11 +32,13 @@ namespace webrtc { @@ -32,11 +32,13 @@ namespace webrtc {
namespace { namespace {
@ -1987,7 +1949,7 @@ index fecb329db..d478604aa 100644
// DesktopCapturer interface. // DesktopCapturer interface.
void Start(Callback* callback) override; void Start(Callback* callback) override;
@@ -78,10 +80,10 @@ class WindowCapturerLinux : public DesktopCapturer, @@ -78,10 +80,10 @@ class WindowCapturerLinux : public Deskt
::Window selected_window_ = 0; ::Window selected_window_ = 0;
XServerPixelBuffer x_server_pixel_buffer_; XServerPixelBuffer x_server_pixel_buffer_;
@ -2000,7 +1962,7 @@ index fecb329db..d478604aa 100644
: x_display_(options.x_display()) { : x_display_(options.x_display()) {
// Create Atoms so we don't need to do it every time they are used. // Create Atoms so we don't need to do it every time they are used.
wm_state_atom_ = XInternAtom(display(), "WM_STATE", True); wm_state_atom_ = XInternAtom(display(), "WM_STATE", True);
@@ -102,11 +104,11 @@ WindowCapturerLinux::WindowCapturerLinux(const DesktopCaptureOptions& options) @@ -102,11 +104,11 @@ WindowCapturerLinux::WindowCapturerLinux
x_display_->AddEventHandler(ConfigureNotify, this); x_display_->AddEventHandler(ConfigureNotify, this);
} }
@ -2014,7 +1976,7 @@ index fecb329db..d478604aa 100644
SourceList result; SourceList result;
XErrorTrap error_trap(display()); XErrorTrap error_trap(display());
@@ -159,7 +161,7 @@ bool WindowCapturerLinux::GetSourceList(SourceList* sources) { @@ -159,7 +161,7 @@ bool WindowCapturerLinux::GetSourceList(
return true; return true;
} }
@ -2023,7 +1985,7 @@ index fecb329db..d478604aa 100644
if (!x_server_pixel_buffer_.Init(display(), id)) if (!x_server_pixel_buffer_.Init(display(), id))
return false; return false;
@@ -180,7 +182,7 @@ bool WindowCapturerLinux::SelectSource(SourceId id) { @@ -180,7 +182,7 @@ bool WindowCapturerLinux::SelectSource(S
return true; return true;
} }
@ -2032,7 +1994,7 @@ index fecb329db..d478604aa 100644
if (!selected_window_) if (!selected_window_)
return false; return false;
@@ -229,18 +231,18 @@ bool WindowCapturerLinux::FocusOnSelectedSource() { @@ -229,18 +231,18 @@ bool WindowCapturerLinux::FocusOnSelecte
return true; return true;
} }
@ -2054,7 +2016,7 @@ index fecb329db..d478604aa 100644
x_display_->ProcessPendingXEvents(); x_display_->ProcessPendingXEvents();
if (!x_server_pixel_buffer_.IsWindowValid()) { if (!x_server_pixel_buffer_.IsWindowValid()) {
@@ -274,7 +276,7 @@ void WindowCapturerLinux::CaptureFrame() { @@ -274,7 +276,7 @@ void WindowCapturerLinux::CaptureFrame()
callback_->OnCaptureResult(Result::SUCCESS, std::move(frame)); callback_->OnCaptureResult(Result::SUCCESS, std::move(frame));
} }
@ -2063,7 +2025,7 @@ index fecb329db..d478604aa 100644
if (event.type == ConfigureNotify) { if (event.type == ConfigureNotify) {
XConfigureEvent xce = event.xconfigure; XConfigureEvent xce = event.xconfigure;
if (!DesktopSize(xce.width, xce.height).equals( if (!DesktopSize(xce.width, xce.height).equals(
@@ -288,7 +290,7 @@ bool WindowCapturerLinux::HandleXEvent(const XEvent& event) { @@ -288,7 +290,7 @@ bool WindowCapturerLinux::HandleXEvent(c
return false; return false;
} }
@ -2072,7 +2034,7 @@ index fecb329db..d478604aa 100644
// Get WM_STATE property of the window. // Get WM_STATE property of the window.
XWindowProperty<uint32_t> window_state(display(), window, wm_state_atom_); XWindowProperty<uint32_t> window_state(display(), window, wm_state_atom_);
@@ -326,7 +328,7 @@ bool WindowCapturerLinux::HandleXEvent(const XEvent& event) { @@ -326,7 +328,7 @@ bool WindowCapturerLinux::HandleXEvent(c
return app_window; return app_window;
} }
@ -2081,7 +2043,7 @@ index fecb329db..d478604aa 100644
if (window == 0) if (window == 0)
return false; return false;
@@ -361,7 +363,7 @@ bool WindowCapturerLinux::IsDesktopElement(::Window window) { @@ -361,7 +363,7 @@ bool WindowCapturerLinux::IsDesktopEleme
return result; return result;
} }
@ -2090,7 +2052,7 @@ index fecb329db..d478604aa 100644
int status; int status;
bool result = false; bool result = false;
XTextProperty window_name; XTextProperty window_name;
@@ -392,7 +394,7 @@ bool WindowCapturerLinux::GetWindowTitle(::Window window, std::string* title) { @@ -392,7 +394,7 @@ bool WindowCapturerLinux::GetWindowTitle
} // namespace } // namespace
@ -2099,7 +2061,7 @@ index fecb329db..d478604aa 100644
// Get _NET_WM_PID property of the window. // Get _NET_WM_PID property of the window.
Atom process_atom = XInternAtom(display(), "_NET_WM_PID", True); Atom process_atom = XInternAtom(display(), "_NET_WM_PID", True);
XWindowProperty<uint32_t> process_id(display(), window, process_atom); XWindowProperty<uint32_t> process_id(display(), window, process_atom);
@@ -401,11 +403,11 @@ int WindowCapturerLinux::GetWindowProcessID(::Window window) { @@ -401,11 +403,11 @@ int WindowCapturerLinux::GetWindowProces
} }
// static // static

View File

@ -1,4 +1,4 @@
%global system_nss 1 %global system_nss 0
%global system_sqlite 0 %global system_sqlite 0
%global system_ffi 1 %global system_ffi 1
%global system_cairo 0 %global system_cairo 0
@ -6,7 +6,8 @@
%global system_libicu 0 %global system_libicu 0
%global hardened_build 1 %global hardened_build 1
%global system_jpeg 1 %global system_jpeg 1
%global build_with_clang 0 %global build_with_clang 1
%global build_with_pgo 0
%if 0%{?fedora} > 29 %if 0%{?fedora} > 29
%global wayland_backend_default 1 %global wayland_backend_default 1
@ -87,13 +88,13 @@
Summary: Mozilla Firefox Web browser Summary: Mozilla Firefox Web browser
Name: firefox Name: firefox
Version: 63.0.3 Version: 64.0
Release: 3%{?pre_tag}%{?dist} Release: 1%{?pre_tag}%{?dist}
URL: https://www.mozilla.org/firefox/ URL: https://www.mozilla.org/firefox/
License: MPLv1.1 or GPLv2+ or LGPLv2+ License: MPLv1.1 or GPLv2+ or LGPLv2+
Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}%{?pre_version}/source/firefox-%{version}%{?pre_version}.source.tar.xz
%if %{with langpacks} %if %{with langpacks}
Source1: firefox-langpacks-%{version}%{?pre_version}-20181115.tar.xz Source1: firefox-langpacks-%{version}%{?pre_version}-20181204.tar.xz
%endif %endif
Source2: cbindgen-vendor.tar.xz Source2: cbindgen-vendor.tar.xz
Source10: firefox-mozconfig Source10: firefox-mozconfig
@ -125,7 +126,6 @@ Patch38: build-cacheFlush-missing.patch
Patch40: build-aarch64-skia.patch Patch40: build-aarch64-skia.patch
Patch41: build-disable-elfhack.patch Patch41: build-disable-elfhack.patch
Patch42: prio-nss-build.patch Patch42: prio-nss-build.patch
Patch43: mozilla-1500366.patch
Patch44: mozilla-1494037.patch Patch44: mozilla-1494037.patch
Patch45: mozilla-1498938.patch Patch45: mozilla-1498938.patch
Patch46: firefox-debug-build.patch Patch46: firefox-debug-build.patch
@ -153,11 +153,9 @@ Patch417: bug1375074-save-restore-x28.patch
Patch421: mozilla-1447775.patch Patch421: mozilla-1447775.patch
# Wayland specific upstream patches # Wayland specific upstream patches
Patch573: mozilla-1415078.patch
Patch574: firefox-pipewire.patch Patch574: firefox-pipewire.patch
Patch581: mozilla-1493081.patch Patch581: mozilla-1493081.patch
Patch582: mozilla-1504689.patch Patch582: mozilla-1504689.patch
Patch583: firefox-init-wayland-clipboard.patch
Patch585: mozilla-1507475.patch Patch585: mozilla-1507475.patch
# Debian patches # Debian patches
@ -340,10 +338,10 @@ This package contains results of tests executed during build.
%patch41 -p1 -b .disable-elfhack %patch41 -p1 -b .disable-elfhack
%endif %endif
%patch3 -p1 -b .arm %patch3 -p1 -b .arm
%patch42 -p1 -b .nss-build # Build with system nss
%patch43 -p1 -b .1500366 #%patch42 -p1 -b .nss-build
%patch44 -p1 -b .1494037 %patch44 -p1 -b .1494037
%patch45 -p1 -b .1498938 #%patch45 -p1 -b .1498938
%patch46 -p1 -b .debug %patch46 -p1 -b .debug
# Fedora patches # Fedora patches
@ -370,13 +368,11 @@ This package contains results of tests executed during build.
%patch421 -p1 -b .1447775 %patch421 -p1 -b .1447775
# Wayland specific upstream patches # Wayland specific upstream patches
%patch573 -p1 -b .1415078
%if 0%{?fedora} > 27 %if 0%{?fedora} > 27
%patch574 -p1 -b .firefox-pipewire %patch574 -p1 -b .firefox-pipewire
%endif %endif
%patch581 -p1 -b .mozilla-1493081 %patch581 -p1 -b .mozilla-1493081
%patch582 -p1 -b .mozilla-1504689 %patch582 -p1 -b .mozilla-1504689
%patch583 -p1 -b .init-wayland-clipboard
%patch585 -p1 -b .mozbz1507475 %patch585 -p1 -b .mozbz1507475
%{__rm} -f .mozconfig %{__rm} -f .mozconfig
@ -570,13 +566,17 @@ export PREFIX='%{_prefix}'
export LIBDIR='%{_libdir}' export LIBDIR='%{_libdir}'
%if %{?build_with_clang} %if %{?build_with_clang}
export CC=clang
export CXX=clang++
export LLVM_PROFDATA="llvm-profdata" export LLVM_PROFDATA="llvm-profdata"
export AR="llvm-ar" #export AR="llvm-ar"
export NM="llvm-nm" #export NM="llvm-nm"
export RANLIB="llvm-ranlib" export RANLIB="llvm-ranlib"
#echo "ac_add_options --enable-linker=lld" >> .mozconfig echo "ac_add_options --enable-linker=lld" >> .mozconfig
%else
export CC=gcc
export CXX=g++
%endif
%if %{?build_with_pgo}
echo "ac_add_options MOZ_PGO=1" >> .mozconfig
%endif %endif
MOZ_SMP_FLAGS=-j1 MOZ_SMP_FLAGS=-j1
@ -934,6 +934,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
#--------------------------------------------------------------------- #---------------------------------------------------------------------
%changelog %changelog
* Tue Dec 4 2018 Martin Stransky <stransky@redhat.com> - 64.0-1
- Updated to Firefox 64 (Build 1)
- Build with clang
* Mon Nov 26 2018 Martin Stransky <stransky@redhat.com> - 63.0.3-3 * Mon Nov 26 2018 Martin Stransky <stransky@redhat.com> - 63.0.3-3
- [Wayland] Fixed issues with Sway compositor and wl_keyboard setup - [Wayland] Fixed issues with Sway compositor and wl_keyboard setup
(mozbz#1507475). (mozbz#1507475).

View File

@ -1,57 +0,0 @@
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
@@ -34,20 +34,18 @@
NS_IMETHODIMP
nsRemoteService::Startup(const char* aAppName, const char* aProfileName)
{
-#if defined(MOZ_ENABLE_DBUS)
+#if defined(MOZ_ENABLE_DBUS) && defined(MOZ_WAYLAND)
nsresult rv;
mDBusRemoteService = new nsDBusRemoteService();
rv = mDBusRemoteService->Startup(aAppName, aProfileName);
if (NS_FAILED(rv)) {
mDBusRemoteService = nullptr;
}
+#elif !defined(MOZ_WAYLAND)
+ mGtkRemoteService = new nsGTKRemoteService();
+ mGtkRemoteService->Startup(aAppName, aProfileName);
#endif
- if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) {
- mGtkRemoteService = new nsGTKRemoteService();
- mGtkRemoteService->Startup(aAppName, aProfileName);
- }
-
if (!mDBusRemoteService && !mGtkRemoteService)
return NS_ERROR_FAILURE;
@@ -73,7 +71,7 @@
NS_IMETHODIMP
nsRemoteService::Shutdown()
{
-#if defined(MOZ_ENABLE_DBUS)
+#if defined(MOZ_ENABLE_DBUS) && defined(MOZ_WAYLAND)
if (mDBusRemoteService) {
mDBusRemoteService->Shutdown();
mDBusRemoteService = nullptr;
diff --git a/widget/xremoteclient/moz.build b/widget/xremoteclient/moz.build
--- a/widget/xremoteclient/moz.build
+++ b/widget/xremoteclient/moz.build
@@ -11,7 +11,6 @@
SOURCES += [
'RemoteUtils.cpp',
- 'XRemoteClient.cpp',
]
if CONFIG['MOZ_ENABLE_DBUS'] and CONFIG['MOZ_WAYLAND']:
@@ -20,3 +19,7 @@
]
CXXFLAGS += CONFIG['TK_CFLAGS']
CXXFLAGS += CONFIG['MOZ_DBUS_GLIB_CFLAGS']
+else:
+ SOURCES += [
+ 'XRemoteClient.cpp',
+ ]

View File

@ -1,52 +0,0 @@
diff -up firefox-63.0/netwerk/wifi/nsWifiScannerDBus.cpp.1500366 firefox-63.0/netwerk/wifi/nsWifiScannerDBus.cpp
--- firefox-63.0/netwerk/wifi/nsWifiScannerDBus.cpp.1500366 2018-10-15 21:20:49.000000000 +0200
+++ firefox-63.0/netwerk/wifi/nsWifiScannerDBus.cpp 2018-10-22 08:37:05.629824640 +0200
@@ -17,6 +17,7 @@ nsWifiScannerDBus::nsWifiScannerDBus(nsC
already_AddRefed<DBusConnection>(dbus_bus_get(DBUS_BUS_SYSTEM, nullptr));
if (mConnection) {
+ dbus_connection_setup_with_g_main(mConnection, nullptr);
dbus_connection_set_exit_on_disconnect(mConnection, false);
}
diff -up firefox-63.0/netwerk/wifi/nsWifiScannerDBus.h.1500366 firefox-63.0/netwerk/wifi/nsWifiScannerDBus.h
--- firefox-63.0/netwerk/wifi/nsWifiScannerDBus.h.1500366 2018-10-15 21:20:49.000000000 +0200
+++ firefox-63.0/netwerk/wifi/nsWifiScannerDBus.h 2018-10-22 08:37:05.629824640 +0200
@@ -9,6 +9,7 @@
#define DBUS_API_SUBJECT_TO_CHANGE
#include <dbus/dbus.h>
+#include <dbus/dbus-glib-lowlevel.h>
class nsWifiAccessPoint;
diff -up firefox-63.0/toolkit/components/remote/nsDBusRemoteService.cpp.1500366 firefox-63.0/toolkit/components/remote/nsDBusRemoteService.cpp
--- firefox-63.0/toolkit/components/remote/nsDBusRemoteService.cpp.1500366 2018-10-15 21:20:52.000000000 +0200
+++ firefox-63.0/toolkit/components/remote/nsDBusRemoteService.cpp 2018-10-22 08:37:05.629824640 +0200
@@ -174,6 +174,7 @@ nsDBusRemoteService::Startup(const char*
return NS_ERROR_FAILURE;
}
dbus_connection_set_exit_on_disconnect(mConnection, false);
+ dbus_connection_setup_with_g_main(mConnection, nullptr);
mAppName = aAppName;
ToLowerCase(mAppName);
diff -up firefox-63.0/widget/xremoteclient/DBusRemoteClient.cpp.1500366 firefox-63.0/widget/xremoteclient/DBusRemoteClient.cpp
--- firefox-63.0/widget/xremoteclient/DBusRemoteClient.cpp.1500366 2018-10-15 21:20:52.000000000 +0200
+++ firefox-63.0/widget/xremoteclient/DBusRemoteClient.cpp 2018-10-22 10:12:29.207925928 +0200
@@ -12,6 +12,7 @@
#include "mozilla/Base64.h"
#include "nsPrintfCString.h"
+#include <dbus/dbus-glib-lowlevel.h>
#include <dlfcn.h>
using mozilla::LogLevel;
@@ -43,6 +44,7 @@ DBusRemoteClient::Init()
return NS_ERROR_FAILURE;
dbus_connection_set_exit_on_disconnect(mConnection, false);
+ dbus_connection_setup_with_g_main(mConnection, nullptr);
return NS_OK;
}

View File

@ -1,194 +1,12 @@
diff -up firefox-63.0.3/widget/gtk/mozcontainer.cpp.mozbz1507475 firefox-63.0.3/widget/gtk/mozcontainer.cpp diff -up firefox-64.0/widget/gtk/nsGtkKeyUtils.cpp.old firefox-64.0/widget/gtk/nsGtkKeyUtils.cpp
--- firefox-63.0.3/widget/gtk/mozcontainer.cpp.mozbz1507475 2018-11-15 01:20:56.000000000 +0100 --- firefox-64.0/widget/gtk/nsGtkKeyUtils.cpp.old 2018-12-05 13:17:51.147655931 +0100
+++ firefox-63.0.3/widget/gtk/mozcontainer.cpp 2018-11-26 09:36:13.083772336 +0100 +++ firefox-64.0/widget/gtk/nsGtkKeyUtils.cpp 2018-12-05 13:18:57.989282016 +0100
@@ -169,6 +169,8 @@ moz_container_class_init (MozContainerCl @@ -590,7 +590,7 @@ seat_handle_capabilities(void *data, str
}
#if defined(MOZ_WAYLAND)
+static struct wl_subcompositor *subcompositor;
+
static void
registry_handle_global (void *data,
struct wl_registry *registry,
@@ -176,9 +178,8 @@ registry_handle_global (void *data,
const char *interface,
uint32_t version)
{ {
- MozContainer *container = MOZ_CONTAINER(data); static wl_keyboard *keyboard = nullptr;
if(strcmp(interface, "wl_subcompositor") == 0) {
- container->subcompositor =
+ subcompositor =
static_cast<wl_subcompositor*>(wl_registry_bind(registry,
name,
&wl_subcompositor_interface,
@@ -197,6 +198,24 @@ static const struct wl_registry_listener
registry_handle_global,
registry_handle_global_remove
};
+
+struct wl_subcompositor* subcompositor_get(void)
+{
+ if (!subcompositor) {
+ GdkDisplay *gdk_display = gdk_display_get_default();
+ // Available as of GTK 3.8+
+ static auto sGdkWaylandDisplayGetWlDisplay =
+ (wl_display *(*)(GdkDisplay *))
+ dlsym(RTLD_DEFAULT, "gdk_wayland_display_get_wl_display");
+
+ wl_display* display = sGdkWaylandDisplayGetWlDisplay(gdk_display);
+ wl_registry* registry = wl_display_get_registry(display);
+ wl_registry_add_listener(registry, &registry_listener, nullptr);
+ wl_display_dispatch(display);
+ wl_display_roundtrip(display);
+ }
+ return subcompositor;
+}
#endif
void
@@ -208,25 +227,10 @@ moz_container_init (MozContainer *contai
#if defined(MOZ_WAYLAND)
{
- container->subcompositor = nullptr;
container->surface = nullptr;
container->subsurface = nullptr;
container->eglwindow = nullptr;
container->parent_surface_committed = false;
-
- GdkDisplay *gdk_display = gtk_widget_get_display(GTK_WIDGET(container));
- if (GDK_IS_WAYLAND_DISPLAY (gdk_display)) {
- // Available as of GTK 3.8+
- static auto sGdkWaylandDisplayGetWlDisplay =
- (wl_display *(*)(GdkDisplay *))
- dlsym(RTLD_DEFAULT, "gdk_wayland_display_get_wl_display");
-
- wl_display* display = sGdkWaylandDisplayGetWlDisplay(gdk_display);
- wl_registry* registry = wl_display_get_registry(display);
- wl_registry_add_listener(registry, &registry_listener, container);
- wl_display_dispatch(display);
- wl_display_roundtrip(display);
- }
}
#endif
}
@@ -298,7 +302,7 @@ moz_container_map_surface(MozContainer *
}
container->subsurface =
- wl_subcompositor_get_subsurface (container->subcompositor,
+ wl_subcompositor_get_subsurface (subcompositor_get(),
container->surface,
gtk_surface);
gint x, y;
diff -up firefox-63.0.3/widget/gtk/mozcontainer.h.mozbz1507475 firefox-63.0.3/widget/gtk/mozcontainer.h
--- firefox-63.0.3/widget/gtk/mozcontainer.h.mozbz1507475 2018-11-15 01:20:56.000000000 +0100
+++ firefox-63.0.3/widget/gtk/mozcontainer.h 2018-11-26 09:36:13.083772336 +0100
@@ -69,7 +69,6 @@ struct _MozContainer
GList *children;
#ifdef MOZ_WAYLAND
- struct wl_subcompositor *subcompositor;
struct wl_surface *surface;
struct wl_subsurface *subsurface;
struct wl_egl_window *eglwindow;
diff -up firefox-63.0.3/widget/gtk/nsGtkKeyUtils.cpp.mozbz1507475 firefox-63.0.3/widget/gtk/nsGtkKeyUtils.cpp
--- firefox-63.0.3/widget/gtk/nsGtkKeyUtils.cpp.mozbz1507475 2018-11-15 01:20:56.000000000 +0100
+++ firefox-63.0.3/widget/gtk/nsGtkKeyUtils.cpp 2018-11-26 09:36:13.084772332 +0100
@@ -584,68 +584,37 @@ static const struct wl_keyboard_listener
keyboard_handle_modifiers,
};
-static void
-seat_handle_capabilities(void *data, struct wl_seat *seat,
- unsigned int caps)
-{
- static wl_keyboard *keyboard = nullptr;
-
- if (caps & WL_SEAT_CAPABILITY_KEYBOARD) { - if (caps & WL_SEAT_CAPABILITY_KEYBOARD) {
- keyboard = wl_seat_get_keyboard(seat); + if ((caps & WL_SEAT_CAPABILITY_KEYBOARD) && !keyboard) {
- wl_keyboard_add_listener(keyboard, &keyboard_listener, nullptr); keyboard = wl_seat_get_keyboard(seat);
- } else if (keyboard && !(caps & WL_SEAT_CAPABILITY_KEYBOARD)) { wl_keyboard_add_listener(keyboard, &keyboard_listener, nullptr);
- wl_keyboard_destroy(keyboard); } else if (keyboard && !(caps & WL_SEAT_CAPABILITY_KEYBOARD)) {
- keyboard = nullptr;
- }
-}
-
-static const struct wl_seat_listener seat_listener = {
- seat_handle_capabilities,
-};
-
-static void
-gdk_registry_handle_global(void *data,
- struct wl_registry *registry,
- uint32_t id,
- const char *interface,
- uint32_t version)
-{
- if (strcmp(interface, "wl_seat") == 0) {
- wl_seat *seat =
- (wl_seat*)wl_registry_bind(registry, id, &wl_seat_interface, 1);
- wl_seat_add_listener(seat, &seat_listener, data);
- }
-}
-
-static void
-gdk_registry_handle_global_remove(void *data,
- struct wl_registry *registry,
- uint32_t id)
-{
-}
-
-static const struct wl_registry_listener keyboard_registry_listener = {
- gdk_registry_handle_global,
- gdk_registry_handle_global_remove
-};
-
void
KeymapWrapper::InitBySystemSettingsWayland()
{
- // Available as of GTK 3.8+
- static auto sGdkWaylandDisplayGetWlDisplay =
- (wl_display *(*)(GdkDisplay *))
- dlsym(RTLD_DEFAULT, "gdk_wayland_display_get_wl_display");
-
- wl_display *display =
- sGdkWaylandDisplayGetWlDisplay(gdk_display_get_default());
- wl_registry_add_listener(wl_display_get_registry(display),
- &keyboard_registry_listener, this);
-
- // Call wl_display_roundtrip() twice to make sure all
- // callbacks are processed.
- wl_display_roundtrip(display);
- wl_display_roundtrip(display);
+ GdkDeviceManager* manager =
+ gdk_display_get_device_manager(gdk_display_get_default());
+ GList* devices =
+ gdk_device_manager_list_devices(manager, GDK_DEVICE_TYPE_MASTER);
+ GdkDevice* device = nullptr;
+
+ GList* list = devices;
+ while (devices) {
+ device = static_cast<GdkDevice*>(devices->data);
+ if (gdk_device_get_source(device) == GDK_SOURCE_KEYBOARD) {
+ break;
+ }
+ devices = devices->next;
+ }
+
+ if (list) {
+ g_list_free(list);
+ }
+
+ if (device) {
+ // Present in Gtk+ 3.10
+ static auto sGdkWaylandDeviceGetWlKeyboard =
+ (struct wl_keyboard * (*)(GdkDevice *device))
+ dlsym(RTLD_DEFAULT, "gdk_wayland_device_get_wl_keyboard");
+
+ wl_keyboard_add_listener(sGdkWaylandDeviceGetWlKeyboard(device),
+ &keyboard_listener, nullptr);
+ }
}
#endif

View File

@ -1,3 +1,3 @@
SHA512 (cbindgen-vendor.tar.xz) = 6d1a6ef48e77920bccd51af27c836d66aed49a571a0f5298df9cc87724467a5542e382485aa6c5ed2b516277086ffe4d5360b9eb4c0ab62ef6e3e027fc736ead SHA512 (cbindgen-vendor.tar.xz) = 6d1a6ef48e77920bccd51af27c836d66aed49a571a0f5298df9cc87724467a5542e382485aa6c5ed2b516277086ffe4d5360b9eb4c0ab62ef6e3e027fc736ead
SHA512 (firefox-63.0.3.source.tar.xz) = 6c05aea0b704ede39abf83aba02c4713a8f5ab6673a8897f6bb4147d5e90c234e351f584010e195e46382d217d02d8eec5a5d4b9f4694c14c55172987bb695c2 SHA512 (firefox-64.0.source.tar.xz) = e22460333c3ccc7bcc6655f21548a4a03796bba0b65bc36419d895c934b3121a9be6e1d1552a2677f202fdc6ff5ddc808549edeb01f47a737bdfcfba9527fb69
SHA512 (firefox-langpacks-63.0.3-20181115.tar.xz) = d6e35d0924ff49ad8fdd894c079833e72c3e264d3a1e6d7a54028f8e931c3ec5250e08d388ac8ca46f6c2ab448e89b0c266d1630f8778ff8834122711057d890 SHA512 (firefox-langpacks-64.0-20181204.tar.xz) = 10172c5d03d0046eda54da4380908cb2671c672df56113dbdcf53e3f1ce372db798a7f97f55153714a8c9b924ec242e615d29878ac7a3ad7d995f88424d48647