From patchwork Sun Oct 11 02:04:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Lepiller X-Patchwork-Id: 24553 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 398B327BBE9; Sun, 11 Oct 2020 03:05:15 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id AC5F027BBEA for ; Sun, 11 Oct 2020 03:05:10 +0100 (BST) Received: from localhost ([::1]:52148 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kRQjV-0006In-II for patchwork@mira.cbaines.net; Sat, 10 Oct 2020 22:05:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:32796) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kRQjO-0006HP-EK for guix-patches@gnu.org; Sat, 10 Oct 2020 22:05:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:55564) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kRQjO-0005Fc-55 for guix-patches@gnu.org; Sat, 10 Oct 2020 22:05:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kRQjN-0007xL-Pb for guix-patches@gnu.org; Sat, 10 Oct 2020 22:05:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#43918] [PATCH] gnu: libcanberra: Fix a crash on wayland Resent-From: Julien Lepiller Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 11 Oct 2020 02:05:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 43918 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 43918@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.160238189030561 (code B ref -1); Sun, 11 Oct 2020 02:05:01 +0000 Received: (at submit) by debbugs.gnu.org; 11 Oct 2020 02:04:50 +0000 Received: from localhost ([127.0.0.1]:38877 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kRQjB-0007wr-Qk for submit@debbugs.gnu.org; Sat, 10 Oct 2020 22:04:50 -0400 Received: from lists.gnu.org ([209.51.188.17]:40918) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kRQj7-0007wg-FN for submit@debbugs.gnu.org; Sat, 10 Oct 2020 22:04:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:32774) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kRQj6-0006Gj-RJ for guix-patches@gnu.org; Sat, 10 Oct 2020 22:04:45 -0400 Received: from lepiller.eu ([2a00:5884:8208::1]:47852) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kRQj1-0005F2-3v for guix-patches@gnu.org; Sat, 10 Oct 2020 22:04:44 -0400 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 65a50a26 for ; Sun, 11 Oct 2020 02:04:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:subject:message-id:mime-version:content-type; s=dkim; bh=s1f iPeyM3ky5j6o75aqsjC/bYbfmwK1d9uYpt35swaQ=; b=brnm/aZOmbQpc59a2KU Burw1oPW7+j5aa0vJjh75LyCidcXVtN3oOpM1uxTx/0Oz7TFQuKjvAix5O5//pFS WoRfwrPtY1L0mXhjUvX0/sYQslSnCoNG8uuLGzZlUHcI4yvBCIpJ9M34VxekhQul Pm2gzBJKtaF9qUFIVWOVDyQa6nR+GMozKM56LMyrGr57F4LHqdQ9XTZAE48HZ92F cY7GC222MFwiB2ATkAli3qzoRcX13+PBrXOHCV4mx0nCI5xAW2wdpEJ/IYx5dlVr 0pzvUz2mncFTdCTZW++X4y2kDtAoyUEeiPWyxWrS/vUPfXG0vZbbUu6ualgm/WXv GTw== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 206a77c5 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for ; Sun, 11 Oct 2020 02:04:33 +0000 (UTC) Date: Sun, 11 Oct 2020 04:04:20 +0200 From: Julien Lepiller Message-ID: <20201011040420.269429ff@tachikoma.lepiller.eu> X-Mailer: Claws Mail 3.17.7 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:5884:8208::1; envelope-from=julien@lepiller.eu; helo=lepiller.eu X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hi Guix! Trying to play with sway, I noticed a crash in pavucontrol, when changing the volume of outputs (strangely enough, not of individual applications). This was already reported upstream, and they found the cause to be the assumption libcanberra makes that you're running on Xorg. This commit adds a patch that remove this assumption, and was pushed to libcanberra after the latest release (in 2012!). From 98f3633c36ff4638910b4507cd09990910cac790 Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Sun, 11 Oct 2020 03:58:50 +0200 Subject: [PATCH] gnu: libcanberra: Fix crashes on wayland. * gnu/packages/patches/libcanberra-wayland-crash.patch: New file. * gnu/packages/libcanberra.scm (libcanberra): Add it. * gnu/local.mk (dist_PATCH_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/libcanberra.scm | 3 +- .../patches/libcanberra-wayland-crash.patch | 55 +++++++++++++++++++ 3 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/libcanberra-wayland-crash.patch diff --git a/gnu/local.mk b/gnu/local.mk index b59b122e86..a34902abc9 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1228,6 +1228,7 @@ dist_patch_DATA = \ %D%/packages/patches/libbase-use-own-logging.patch \ %D%/packages/patches/libbonobo-activation-test-race.patch \ %D%/packages/patches/libcanberra-sound-theme-freedesktop.patch \ + %D%/packages/patches/libcanberra-wayland-crash.patch \ %D%/packages/patches/libdrm-realpath-virtio.patch \ %D%/packages/patches/libgeotiff-adapt-test-script-for-proj-6.2.patch \ %D%/packages/patches/libgit2-mtime-0.patch \ diff --git a/gnu/packages/libcanberra.scm b/gnu/packages/libcanberra.scm index 32d1cd3605..2d08fb46e3 100644 --- a/gnu/packages/libcanberra.scm +++ b/gnu/packages/libcanberra.scm @@ -69,7 +69,8 @@ ;; his pleasure. (patch-flags '("-p0")) (patches - (search-patches "libcanberra-sound-theme-freedesktop.patch")))) + (search-patches "libcanberra-sound-theme-freedesktop.patch" + "libcanberra-wayland-crash.patch")))) (build-system gnu-build-system) (inputs `(("alsa-lib" ,alsa-lib) diff --git a/gnu/packages/patches/libcanberra-wayland-crash.patch b/gnu/packages/patches/libcanberra-wayland-crash.patch new file mode 100644 index 0000000000..e347436bbe --- /dev/null +++ b/gnu/packages/patches/libcanberra-wayland-crash.patch @@ -0,0 +1,55 @@ +# This patch comes from upstream commit c0620e432650e81062c1967cc669829dbd29b310. +# gtk: Don't assume all GdkDisplays are GdkX11Displays: broadway/wayland + +--- src/canberra-gtk-module.c.orig ++++ src/canberra-gtk-module.c +@@ -307,6 +307,11 @@ static gint window_get_desktop(GdkDisplay *d, GdkWindow *w) { + guchar *data = NULL; + gint ret = -1; + ++#ifdef GDK_IS_X11_DISPLAY ++ if (!GDK_IS_X11_DISPLAY(d)) ++ return 0; ++#endif ++ + if (XGetWindowProperty(GDK_DISPLAY_XDISPLAY(d), GDK_WINDOW_XID(w), + gdk_x11_get_xatom_by_name_for_display(d, "_NET_WM_DESKTOP"), + 0, G_MAXLONG, False, XA_CARDINAL, &type_return, +@@ -335,6 +340,11 @@ static gint display_get_desktop(GdkDisplay *d) { + guchar *data = NULL; + gint ret = -1; + ++#ifdef GDK_IS_X11_DISPLAY ++ if (!GDK_IS_X11_DISPLAY(d)) ++ return 0; ++#endif ++ + if (XGetWindowProperty(GDK_DISPLAY_XDISPLAY(d), DefaultRootWindow(GDK_DISPLAY_XDISPLAY(d)), + gdk_x11_get_xatom_by_name_for_display(d, "_NET_CURRENT_DESKTOP"), + 0, G_MAXLONG, False, XA_CARDINAL, &type_return, +@@ -365,6 +375,11 @@ static gboolean window_is_xembed(GdkDisplay *d, GdkWindow *w) { + gboolean ret = FALSE; + Atom xembed; + ++#ifdef GDK_IS_X11_DISPLAY ++ if (!GDK_IS_X11_DISPLAY(d)) ++ return FALSE; ++#endif ++ + /* Gnome Panel applets are XEMBED windows. We need to make sure we + * ignore them */ + +--- src/canberra-gtk.c.orig ++++ src/canberra-gtk.c +@@ -185,6 +185,11 @@ static gint window_get_desktop(GdkDisplay *d, GdkWindow *w) { + guchar *data = NULL; + gint ret = -1; + ++#ifdef GDK_IS_X11_DISPLAY ++ if (!GDK_IS_X11_DISPLAY(d)) ++ return 0; ++#endif ++ + if (XGetWindowProperty(GDK_DISPLAY_XDISPLAY(d), GDK_WINDOW_XID(w), + gdk_x11_get_xatom_by_name_for_display(d, "_NET_WM_DESKTOP"), + 0, G_MAXLONG, False, XA_CARDINAL, &type_return, -- 2.28.0