about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/audio
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2020-05-12 14:45:39 +0000
committerAlyssa Ross <hi@alyssa.is>2020-05-12 14:56:01 +0000
commiteb7dadee9c0f903f1152f8dd4165453bfa48ccf4 (patch)
treea6bd66dcbec895aae167465672af08a1ca70f089 /nixpkgs/pkgs/tools/audio
parent3879b925f5dae3a0eb5c98b10c1ac5a0e4d729a3 (diff)
parent683c68232e91f76386db979c461d8fbe2a018782 (diff)
downloadnixlib-eb7dadee9c0f903f1152f8dd4165453bfa48ccf4.tar
nixlib-eb7dadee9c0f903f1152f8dd4165453bfa48ccf4.tar.gz
nixlib-eb7dadee9c0f903f1152f8dd4165453bfa48ccf4.tar.bz2
nixlib-eb7dadee9c0f903f1152f8dd4165453bfa48ccf4.tar.lz
nixlib-eb7dadee9c0f903f1152f8dd4165453bfa48ccf4.tar.xz
nixlib-eb7dadee9c0f903f1152f8dd4165453bfa48ccf4.tar.zst
nixlib-eb7dadee9c0f903f1152f8dd4165453bfa48ccf4.zip
Merge commit '683c68232e91f76386db979c461d8fbe2a018782'
Diffstat (limited to 'nixpkgs/pkgs/tools/audio')
-rw-r--r--nixpkgs/pkgs/tools/audio/pasystray/default.nix5
-rw-r--r--nixpkgs/pkgs/tools/audio/pasystray/fix-wayland.patch34
2 files changed, 39 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/audio/pasystray/default.nix b/nixpkgs/pkgs/tools/audio/pasystray/default.nix
index 648dcad42bad..8b0580ba98c4 100644
--- a/nixpkgs/pkgs/tools/audio/pasystray/default.nix
+++ b/nixpkgs/pkgs/tools/audio/pasystray/default.nix
@@ -14,6 +14,11 @@ stdenv.mkDerivation rec {
     sha256 = "0xx1bm9kimgq11a359ikabdndqg5q54pn1d1dyyjnrj0s41168fk";
   };
 
+  patches = [
+    # https://github.com/christophgysin/pasystray/issues/90#issuecomment-306190701
+    ./fix-wayland.patch
+  ];
+
   nativeBuildInputs = [ pkgconfig autoreconfHook wrapGAppsHook ];
   buildInputs = [
     gnome3.adwaita-icon-theme
diff --git a/nixpkgs/pkgs/tools/audio/pasystray/fix-wayland.patch b/nixpkgs/pkgs/tools/audio/pasystray/fix-wayland.patch
new file mode 100644
index 000000000000..17c4e2e6d658
--- /dev/null
+++ b/nixpkgs/pkgs/tools/audio/pasystray/fix-wayland.patch
@@ -0,0 +1,34 @@
+--- a/src/x11-property.c
++++ b/src/x11-property.c
+@@ -43,11 +43,15 @@ static Window window;
+ void x11_property_init()
+ {
+     display = gdk_x11_get_default_xdisplay();
++    if (!GDK_IS_X11_DISPLAY(display)) return;
++    Screen* scr = ScreenOfDisplay(display, 0);
++
+     window = RootWindow(display, 0);
+ }
+ 
+ void x11_property_set(const char* key, const char* value)
+ {
++    if (!GDK_IS_X11_DISPLAY(display)) return;
+     g_debug("[x11-property] setting '%s' to '%s'", key, value);
+ 
+     Atom atom = XInternAtom(display, key, False);
+@@ -57,6 +61,7 @@ void x11_property_set(const char* key, c
+ 
+ void x11_property_del(const char* key)
+ {
++    if (!GDK_IS_X11_DISPLAY(display)) return;
+     g_debug("[x11-property] deleting '%s'", key);
+ 
+     Atom atom = XInternAtom(display, key, False);
+@@ -65,6 +70,7 @@ void x11_property_del(const char* key)
+ 
+ char* x11_property_get(const char* key)
+ {
++    if (!GDK_IS_X11_DISPLAY(display)) return NULL;
+     Atom property = XInternAtom(display, key, False);
+     Atom actual_type;
+     int actual_format;