pkgsrc-Changes archive

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

CVS commit: pkgsrc/audio/libcanberra



Module Name:    pkgsrc
Committed By:   adam
Date:           Sun Dec 10 17:57:43 UTC 2017

Modified Files:
        pkgsrc/audio/libcanberra: distinfo
Added Files:
        pkgsrc/audio/libcanberra/patches: patch-src_canberra-gtk-module.c
            patch-src_canberra-gtk.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 pkgsrc/audio/libcanberra/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/audio/libcanberra/patches/patch-src_canberra-gtk-module.c \
    pkgsrc/audio/libcanberra/patches/patch-src_canberra-gtk.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/audio/libcanberra/distinfo
diff -u pkgsrc/audio/libcanberra/distinfo:1.7 pkgsrc/audio/libcanberra/distinfo:1.8
--- pkgsrc/audio/libcanberra/distinfo:1.7       Tue Nov  3 01:12:36 2015
+++ pkgsrc/audio/libcanberra/distinfo   Sun Dec 10 17:57:42 2017
@@ -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 @@ Size (libcanberra-0.27.tar.gz) = 490442 
 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

Added files:

Index: pkgsrc/audio/libcanberra/patches/patch-src_canberra-gtk-module.c
diff -u /dev/null pkgsrc/audio/libcanberra/patches/patch-src_canberra-gtk-module.c:1.1
--- /dev/null   Sun Dec 10 17:57:43 2017
+++ pkgsrc/audio/libcanberra/patches/patch-src_canberra-gtk-module.c    Sun Dec 10 17:57:42 2017
@@ -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;
+ }
Index: pkgsrc/audio/libcanberra/patches/patch-src_canberra-gtk.c
diff -u /dev/null pkgsrc/audio/libcanberra/patches/patch-src_canberra-gtk.c:1.1
--- /dev/null   Sun Dec 10 17:57:43 2017
+++ pkgsrc/audio/libcanberra/patches/patch-src_canberra-gtk.c   Sun Dec 10 17:57:42 2017
@@ -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