diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2022-01-16 12:01:11 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-16 12:01:11 +0000 |
commit | 0173b359a6c9876f987fc77242180255130e75c5 (patch) | |
tree | 0f37da3472d10b9ffbd8bd21070f013b4a85b1e4 /pkgs/applications/networking/browsers | |
parent | 122cae786e3c1c60457d59ba1fdce92bf0f81855 (diff) | |
parent | 3a13cdf0c125d983b8ee429d99e5f06108d879ba (diff) | |
download | nixpkgs-0173b359a6c9876f987fc77242180255130e75c5.tar nixpkgs-0173b359a6c9876f987fc77242180255130e75c5.tar.gz nixpkgs-0173b359a6c9876f987fc77242180255130e75c5.tar.bz2 nixpkgs-0173b359a6c9876f987fc77242180255130e75c5.tar.lz nixpkgs-0173b359a6c9876f987fc77242180255130e75c5.tar.xz nixpkgs-0173b359a6c9876f987fc77242180255130e75c5.tar.zst nixpkgs-0173b359a6c9876f987fc77242180255130e75c5.zip |
Merge master into staging-next
Diffstat (limited to 'pkgs/applications/networking/browsers')
-rw-r--r-- | pkgs/applications/networking/browsers/chromium/common.nix | 12 | ||||
-rw-r--r-- | pkgs/applications/networking/browsers/chromium/patches/m97-ozone-wayland-fix-surface_augmenter.patch | 31 |
2 files changed, 42 insertions, 1 deletions
diff --git a/pkgs/applications/networking/browsers/chromium/common.nix b/pkgs/applications/networking/browsers/chromium/common.nix index b4fdf61d166..d9385ceb042 100644 --- a/pkgs/applications/networking/browsers/chromium/common.nix +++ b/pkgs/applications/networking/browsers/chromium/common.nix @@ -161,13 +161,23 @@ let ./patches/no-build-timestamps.patch # For bundling Widevine (DRM), might be replaceable via bundle_widevine_cdm=true in gnFlags: ./patches/widevine-79.patch - ] ++ lib.optionals (versionRange "98" "99") [ + ] ++ lib.optionals (versionRange "97" "98") [ # A critical Ozone/Wayland fix: + # (Note: The patch for surface_augmenter.cc doesn't apply on M97 so we extract that part.) + (fetchpatch { + # [linux/wayland] Fixed terminate caused by binding to wrong version. + url = "https://github.com/chromium/chromium/commit/dd4c3ddadbb9869f59cee201a38e9ca3b9154f4d.patch"; + excludes = [ "ui/ozone/platform/wayland/host/surface_augmenter.cc" ]; + sha256 = "sha256-lp4kxPNAkafdE9NfD3ittTCpomRpX9Hqhtt9GFf4Ntw="; + }) + ./patches/m97-ozone-wayland-fix-surface_augmenter.patch + ] ++ lib.optionals (versionRange "98" "99") [ (githubPatch { # [linux/wayland] Fixed terminate caused by binding to wrong version. commit = "dd4c3ddadbb9869f59cee201a38e9ca3b9154f4d"; sha256 = "sha256-FH7lBQTruMzkBT2XQ+kgADmJA0AxJfaV/gvtoqfQ4a4="; }) + ] ++ lib.optionals (versionRange "97" "99") [ (githubPatch { # [linux/wayland] Fixed terminate caused by binding to wrong version. (fixup) commit = "a84b79daa8897b822336b8f348ef4daaae07af37"; diff --git a/pkgs/applications/networking/browsers/chromium/patches/m97-ozone-wayland-fix-surface_augmenter.patch b/pkgs/applications/networking/browsers/chromium/patches/m97-ozone-wayland-fix-surface_augmenter.patch new file mode 100644 index 00000000000..e63000fabc1 --- /dev/null +++ b/pkgs/applications/networking/browsers/chromium/patches/m97-ozone-wayland-fix-surface_augmenter.patch @@ -0,0 +1,31 @@ +diff --git a/ui/ozone/platform/wayland/host/surface_augmenter.cc b/ui/ozone/platform/wayland/host/surface_augmenter.cc +index d971d15e71426..6e5408398bcea 100644 +--- a/ui/ozone/platform/wayland/host/surface_augmenter.cc ++++ b/ui/ozone/platform/wayland/host/surface_augmenter.cc +@@ -13,7 +13,8 @@ + namespace ui { + + namespace { +-constexpr uint32_t kMaxSurfaceAugmenterVersion = 1; ++constexpr uint32_t kMinVersion = 1; ++constexpr uint32_t kMaxVersion = 1; + } + + // static +@@ -27,11 +28,13 @@ void SurfaceAugmenter::Instantiate(WaylandConnection* connection, + uint32_t version) { + DCHECK_EQ(interface, kInterfaceName); + +- if (connection->surface_augmenter_) ++ if (connection->surface_augmenter_ || ++ !wl::CanBind(interface, version, kMinVersion, kMaxVersion)) { + return; ++ } + +- auto augmenter = wl::Bind<surface_augmenter>( +- registry, name, std::min(version, kMaxSurfaceAugmenterVersion)); ++ auto augmenter = wl::Bind<surface_augmenter>(registry, name, ++ std::min(version, kMaxVersion)); + if (!augmenter) { + LOG(ERROR) << "Failed to bind surface_augmenter"; + return; |