pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/audio/libcanberra libcanberra: Fix for GTK compiled wi...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/f65b4bf7adb8
branches:  trunk
changeset: 372591:f65b4bf7adb8
user:      adam <adam%pkgsrc.org@localhost>
date:      Sun Dec 10 17:57:42 2017 +0000

description:
libcanberra: Fix for GTK compiled with Quartz support. (PR 52570)

diffstat:

 audio/libcanberra/distinfo                                |   4 +-
 audio/libcanberra/patches/patch-src_canberra-gtk-module.c |  82 +++++++++++++++
 audio/libcanberra/patches/patch-src_canberra-gtk.c        |  60 ++++++++++
 3 files changed, 145 insertions(+), 1 deletions(-)

diffs (165 lines):

diff -r de62e2d973e9 -r f65b4bf7adb8 audio/libcanberra/distinfo
--- a/audio/libcanberra/distinfo        Sun Dec 10 17:34:35 2017 +0000
+++ b/audio/libcanberra/distinfo        Sun Dec 10 17:57:42 2017 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.7 2015/11/03 01:12:36 agc Exp $
+$NetBSD: distinfo,v 1.8 2017/12/10 17:57:42 adam Exp $
 
 SHA1 (libcanberra-0.27.tar.gz) = b2dc2b23109f32a11217b71f87c044f1ef9b7977
 RMD160 (libcanberra-0.27.tar.gz) = 1003bedf3fd6025ad046645f9a88af3d8653a0e5
@@ -7,3 +7,5 @@
 SHA1 (patch-aa) = abef0e544f8d9789e971511c9b363b33dd2391ca
 SHA1 (patch-ab) = 2a5767e0aa29f5dc4f6b6fd15a0f2aaf1f5dd329
 SHA1 (patch-config.h.in) = 26c549594db30b525cab345bb19c9455f52098d2
+SHA1 (patch-src_canberra-gtk-module.c) = 5ab76ce609baada6d79c240184cfbaf40572b6af
+SHA1 (patch-src_canberra-gtk.c) = 61a58d2ab4f459d519281cd3772f27b5b8243406
diff -r de62e2d973e9 -r f65b4bf7adb8 audio/libcanberra/patches/patch-src_canberra-gtk-module.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/libcanberra/patches/patch-src_canberra-gtk-module.c Sun Dec 10 17:57:42 2017 +0000
@@ -0,0 +1,82 @@
+$NetBSD: patch-src_canberra-gtk-module.c,v 1.1 2017/12/10 17:57:42 adam Exp $
+
+Fix for GTK compiled with Quartz support.
+
+--- src/canberra-gtk-module.c.orig     2017-12-10 17:42:16.000000000 +0000
++++ src/canberra-gtk-module.c
+@@ -25,8 +25,10 @@
+ #endif
+ 
+ #include <gtk/gtk.h>
++#ifndef GDK_WINDOWING_QUARTZ
+ #include <gdk/gdkx.h>
+ #include <X11/Xatom.h>
++#endif
+ 
+ #include "canberra-gtk.h"
+ 
+@@ -300,12 +302,13 @@ static SoundEventData* filter_sound_even
+ }
+ 
+ static gint window_get_desktop(GdkDisplay *d, GdkWindow *w) {
++        gint ret = -1;
++#ifndef GDK_WINDOWING_QUARTZ
+         Atom type_return;
+         gint format_return;
+         gulong nitems_return;
+         gulong bytes_after_return;
+         guchar *data = NULL;
+-        gint ret = -1;
+ 
+         if (XGetWindowProperty(GDK_DISPLAY_XDISPLAY(d), GDK_WINDOW_XID(w),
+                                gdk_x11_get_xatom_by_name_for_display(d, "_NET_WM_DESKTOP"),
+@@ -323,17 +326,19 @@ static gint window_get_desktop(GdkDispla
+ 
+         if (type_return != None && data != NULL)
+                 XFree(data);
++#endif
+ 
+         return ret;
+ }
+ 
+ static gint display_get_desktop(GdkDisplay *d) {
++        gint ret = -1;
++#ifndef GDK_WINDOWING_QUARTZ
+         Atom type_return;
+         gint format_return;
+         gulong nitems_return;
+         gulong bytes_after_return;
+         guchar *data = NULL;
+-        gint ret = -1;
+ 
+         if (XGetWindowProperty(GDK_DISPLAY_XDISPLAY(d), DefaultRootWindow(GDK_DISPLAY_XDISPLAY(d)),
+                                gdk_x11_get_xatom_by_name_for_display(d, "_NET_CURRENT_DESKTOP"),
+@@ -352,17 +357,19 @@ static gint display_get_desktop(GdkDispl
+ 
+         if (type_return != None && data != NULL)
+                 XFree(data);
++#endif
+ 
+         return ret;
+ }
+ 
+ static gboolean window_is_xembed(GdkDisplay *d, GdkWindow *w) {
++        gboolean ret = FALSE;
++#ifndef GDK_WINDOWING_QUARTZ
+         Atom type_return;
+         gint format_return;
+         gulong nitems_return;
+         gulong bytes_after_return;
+         guchar *data = NULL;
+-        gboolean ret = FALSE;
+         Atom xembed;
+ 
+         /* Gnome Panel applets are XEMBED windows. We need to make sure we
+@@ -383,6 +390,7 @@ static gboolean window_is_xembed(GdkDisp
+ 
+         if (type_return != None && data != NULL)
+                 XFree(data);
++#endif
+ 
+         return ret;
+ }
diff -r de62e2d973e9 -r f65b4bf7adb8 audio/libcanberra/patches/patch-src_canberra-gtk.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/libcanberra/patches/patch-src_canberra-gtk.c        Sun Dec 10 17:57:42 2017 +0000
@@ -0,0 +1,60 @@
+$NetBSD: patch-src_canberra-gtk.c,v 1.1 2017/12/10 17:57:42 adam Exp $
+
+Fix for GTK compiled with Quartz support.
+
+--- src/canberra-gtk.c.orig    2017-12-10 17:38:26.000000000 +0000
++++ src/canberra-gtk.c
+@@ -26,8 +26,10 @@
+ 
+ #include <gtk/gtk.h>
+ #include <gdk/gdk.h>
++#ifndef GDK_WINDOWING_QUARTZ
+ #include <gdk/gdkx.h>
+ #include <X11/Xatom.h>
++#endif
+ 
+ #include "canberra.h"
+ #include "canberra-gtk.h"
+@@ -178,12 +180,13 @@ static GtkWindow* get_toplevel(GtkWidget
+ }
+ 
+ static gint window_get_desktop(GdkDisplay *d, GdkWindow *w) {
++        gint ret = -1;
++#ifndef GDK_WINDOWING_QUARTZ
+         Atom type_return;
+         gint format_return;
+         gulong nitems_return;
+         gulong bytes_after_return;
+         guchar *data = NULL;
+-        gint ret = -1;
+ 
+         if (XGetWindowProperty(GDK_DISPLAY_XDISPLAY(d), GDK_WINDOW_XID(w),
+                                gdk_x11_get_xatom_by_name_for_display(d, "_NET_WM_DESKTOP"),
+@@ -201,6 +204,7 @@ static gint window_get_desktop(GdkDispla
+ 
+         if (type_return != None && data != NULL)
+                 XFree(data);
++#endif
+ 
+         return ret;
+ }
+@@ -258,6 +262,11 @@ int ca_gtk_proplist_set_for_widget(ca_pr
+                 GdkDisplay *display = NULL;
+                 gint x = -1, y = -1, width = -1, height = -1, screen_width = -1, screen_height = -1;
+ 
++#ifdef GDK_WINDOWING_QUARTZ
++                dw = gtk_widget_get_window(GTK_WIDGET(w));
++                display = gtk_widget_get_display(GTK_WIDGET(w));
++                screen = gtk_widget_get_screen(GTK_WIDGET(w));
++#else
+                 if ((dw = gtk_widget_get_window(GTK_WIDGET(w))))
+                         if ((ret = ca_proplist_setf(p, CA_PROP_WINDOW_X11_XID, "%lu", (unsigned long) GDK_WINDOW_XID(dw))) < 0)
+                                 return ret;
+@@ -285,6 +294,7 @@ int ca_gtk_proplist_set_for_widget(ca_pr
+                                 if ((ret = ca_proplist_setf(p, CA_PROP_WINDOW_X11_MONITOR, "%i", gdk_screen_get_monitor_at_window(screen, dw))) < 0)
+                                         return ret;
+                 }
++#endif
+ 
+                 /* FIXME, this might cause a round trip */
+ 



Home | Main Index | Thread Index | Old Index