svn commit: r496644 - in head/audio/libcanberra: . files
Tobias Kortkamp
tobik at FreeBSD.org
Sat Mar 23 12:34:18 UTC 2019
Author: tobik
Date: Sat Mar 23 12:34:16 2019
New Revision: 496644
URL: https://svnweb.freebsd.org/changeset/ports/496644
Log:
audio/libcanberra-gtk3: Add patch that prevents crashes on Wayland
Import patch from upstream to prevent it from crashing when using
the Wayland or Broadway gtk3 backends.
PR: 235465
Submitted by: Greg V <greg at unrelenting.technology>
Obtained from: upstream
Approved by: gnome (maintainer timeout, a month)
Added:
head/audio/libcanberra/files/patch-dont-assume-x11 (contents, props changed)
Modified:
head/audio/libcanberra/Makefile
Modified: head/audio/libcanberra/Makefile
==============================================================================
--- head/audio/libcanberra/Makefile Sat Mar 23 12:17:24 2019 (r496643)
+++ head/audio/libcanberra/Makefile Sat Mar 23 12:34:16 2019 (r496644)
@@ -4,7 +4,7 @@
PORTNAME= libcanberra
PORTVERSION= 0.30
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= audio devel
MASTER_SITES= http://0pointer.de/lennart/projects/libcanberra/ \
http://pkgs.fedoraproject.org/repo/pkgs/libcanberra/libcanberra-0.30.tar.xz/34cb7e4430afaf6f447c4ebdb9b42072/
@@ -18,7 +18,7 @@ LICENSE_FILE= ${WRKSRC}/LGPL
LIB_DEPENDS= libvorbisfile.so:audio/libvorbis \
libltdl.so:devel/libltdl
-USES= gmake libtool pathfix pkgconfig tar:xz
+USES= gmake gnome libtool pathfix pkgconfig tar:xz
USE_GNOME= gnomeprefix gtk20
USE_LDCONFIG= yes
GNU_CONFIGURE= yes
Added: head/audio/libcanberra/files/patch-dont-assume-x11
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/audio/libcanberra/files/patch-dont-assume-x11 Sat Mar 23 12:34:16 2019 (r496644)
@@ -0,0 +1,55 @@
+gtk: Don't assume all GdkDisplays are GdkX11Displays: broadway/wayland
+
+Obtained from: upstream (c0620e432650e81062c1967cc669829dbd29b310)
+--- 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,
More information about the svn-ports-head
mailing list