mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-23 05:37:27 +03:00
Merge pull request #85198 from xtruder/pkgs/bemenu/fix-wayland
pasystray: add patch to fix crash when running under wayland
This commit is contained in:
commit
0e45558707
@ -14,6 +14,11 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "0xx1bm9kimgq11a359ikabdndqg5q54pn1d1dyyjnrj0s41168fk";
|
sha256 = "0xx1bm9kimgq11a359ikabdndqg5q54pn1d1dyyjnrj0s41168fk";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# https://github.com/christophgysin/pasystray/issues/90#issuecomment-306190701
|
||||||
|
./fix-wayland.patch
|
||||||
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig autoreconfHook wrapGAppsHook ];
|
nativeBuildInputs = [ pkgconfig autoreconfHook wrapGAppsHook ];
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
gnome3.adwaita-icon-theme
|
gnome3.adwaita-icon-theme
|
||||||
|
34
pkgs/tools/audio/pasystray/fix-wayland.patch
Normal file
34
pkgs/tools/audio/pasystray/fix-wayland.patch
Normal file
@ -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;
|
Loading…
Reference in New Issue
Block a user