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.master
parent
a2ed00f79f
commit
ec82d58526
|
@ -1228,6 +1228,7 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/libbase-use-own-logging.patch \
|
%D%/packages/patches/libbase-use-own-logging.patch \
|
||||||
%D%/packages/patches/libbonobo-activation-test-race.patch \
|
%D%/packages/patches/libbonobo-activation-test-race.patch \
|
||||||
%D%/packages/patches/libcanberra-sound-theme-freedesktop.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/libdrm-realpath-virtio.patch \
|
||||||
%D%/packages/patches/libgeotiff-adapt-test-script-for-proj-6.2.patch \
|
%D%/packages/patches/libgeotiff-adapt-test-script-for-proj-6.2.patch \
|
||||||
%D%/packages/patches/libgit2-mtime-0.patch \
|
%D%/packages/patches/libgit2-mtime-0.patch \
|
||||||
|
|
|
@ -69,7 +69,8 @@
|
||||||
;; his pleasure.
|
;; his pleasure.
|
||||||
(patch-flags '("-p0"))
|
(patch-flags '("-p0"))
|
||||||
(patches
|
(patches
|
||||||
(search-patches "libcanberra-sound-theme-freedesktop.patch"))))
|
(search-patches "libcanberra-sound-theme-freedesktop.patch"
|
||||||
|
"libcanberra-wayland-crash.patch"))))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(inputs
|
(inputs
|
||||||
`(("alsa-lib" ,alsa-lib)
|
`(("alsa-lib" ,alsa-lib)
|
||||||
|
|
|
@ -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,
|
Reference in New Issue