Merge pull request #139981 from bobby285271/gala

pantheon.gala: 6.2.0 -> 6.2.1
This commit is contained in:
Bobby Rong 2021-09-30 21:15:16 +08:00 committed by GitHub
commit 1f70bb3297
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 57 deletions

View File

@ -29,13 +29,13 @@
stdenv.mkDerivation rec {
pname = "gala";
version = "6.2.0";
version = "6.2.1";
src = fetchFromGitHub {
owner = "elementary";
repo = pname;
rev = version;
sha256 = "1yxsfshahaxiqs5waj4v96rhjhdgyd1za4pwlg3vqq51p75k2b1g";
sha256 = "1phnhj731kvk8ykmm33ypcxk8fkfny9k6kdapl582qh4d47wcy6f";
};
passthru = {
@ -75,11 +75,6 @@ stdenv.mkDerivation rec {
patches = [
./plugins-dir.patch
# https://github.com/elementary/gala/pull/1259
# https://github.com/NixOS/nixpkgs/issues/139404
# Remove this patch when it is included in a new release
# of gala OR when we no longer use mutter 3.38 for pantheon
./fix-session-crash-when-taking-screenshots.patch
];
postPatch = ''

View File

@ -1,50 +0,0 @@
From fa3c39331d4ef56a13019f45d811bde1fc755c21 Mon Sep 17 00:00:00 2001
From: Bobby Rong <rjl931189261@126.com>
Date: Sat, 25 Sep 2021 23:21:01 +0800
Subject: [PATCH] Fix session crash when taking screenshots with mutter 3.38
---
src/ScreenshotManager.vala | 5 ++---
vapi/mutter-clutter.vapi | 2 +-
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/ScreenshotManager.vala b/src/ScreenshotManager.vala
index 3ffb0123..388fee1a 100644
--- a/src/ScreenshotManager.vala
+++ b/src/ScreenshotManager.vala
@@ -354,12 +354,11 @@ namespace Gala {
paint_flags |= Clutter.PaintFlag.FORCE_CURSORS;
}
- unowned var data = image.get_data ();
if (GLib.ByteOrder.HOST == GLib.ByteOrder.LITTLE_ENDIAN) {
wm.stage.paint_to_buffer (
{x, y, width, height},
scale,
- ref data,
+ image.get_data (),
image.get_stride (),
Cogl.PixelFormat.BGRA_8888_PRE,
paint_flags
@@ -368,7 +367,7 @@ namespace Gala {
wm.stage.paint_to_buffer (
{x, y, width, height},
scale,
- ref data,
+ image.get_data (),
image.get_stride (),
Cogl.PixelFormat.ARGB_8888_PRE,
paint_flags
diff --git a/vapi/mutter-clutter.vapi b/vapi/mutter-clutter.vapi
index 5b778cb2..95de24be 100644
--- a/vapi/mutter-clutter.vapi
+++ b/vapi/mutter-clutter.vapi
@@ -7336,7 +7336,7 @@ namespace Clutter {
[Version (since = "1.2")]
public bool get_use_alpha ();
#if HAS_MUTTER338
- public bool paint_to_buffer (Cairo.RectangleInt rect, float scale, [CCode (array_length = false)] ref unowned uint8[] data, int stride, Cogl.PixelFormat format, Clutter.PaintFlag paint_flags) throws GLib.Error;
+ public bool paint_to_buffer (Cairo.RectangleInt rect, float scale, [CCode (array_length = false, type = "uint8_t*")] uint8[] data, int stride, Cogl.PixelFormat format, Clutter.PaintFlag paint_flags) throws GLib.Error;
public void paint_to_framebuffer (Cogl.Framebuffer framebuffer, Cairo.RectangleInt rect, float scale, Clutter.PaintFlag paint_flags);
#else
[Version (since = "0.4")]