mirror of
https://github.com/donovanglover/nix-config.git
synced 2024-11-22 00:03:55 +01:00
ironbar: Update to latest commit
Also patches an issue where Mullvad VPN would crash ironbar if the tray module was enabled.
This commit is contained in:
parent
def180fb2d
commit
accf30ec0b
25
assets/ironbar-fix-tray-crash.patch
Normal file
25
assets/ironbar-fix-tray-crash.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From 2bc741d197867cd5f0c391b9532b4cf9c4d378f6 Mon Sep 17 00:00:00 2001
|
||||
From: Jake Stanger <mail@jstanger.dev>
|
||||
Date: Sun, 4 Aug 2024 13:38:29 +0100
|
||||
Subject: [PATCH] fix(tray): crash when provided empty pixmap
|
||||
|
||||
Fixes #675
|
||||
---
|
||||
src/modules/tray/icon.rs | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/src/modules/tray/icon.rs b/src/modules/tray/icon.rs
|
||||
index c42ff4a5..87a77e50 100644
|
||||
--- a/src/modules/tray/icon.rs
|
||||
+++ b/src/modules/tray/icon.rs
|
||||
@@ -90,6 +90,10 @@ fn get_image_from_pixmap(item: &TrayMenu, size: u32) -> Result<Image> {
|
||||
.and_then(|pixmap| pixmap.first())
|
||||
.ok_or_else(|| Report::msg("Failed to get pixmap from tray icon"))?;
|
||||
|
||||
+ if pixmap.width == 0 || pixmap.height == 0 {
|
||||
+ return Err(Report::msg("empty pixmap"));
|
||||
+ }
|
||||
+
|
||||
let mut pixels = pixmap.pixels.to_vec();
|
||||
|
||||
for i in (0..pixels.len()).step_by(4) {
|
@ -1,19 +1,21 @@
|
||||
final: prev: {
|
||||
ironbar = prev.ironbar.overrideAttrs (oldAttrs: rec {
|
||||
version = "0.15.1-unstable-2024-07-13";
|
||||
version = "0.15.1-unstable-2024-08-04";
|
||||
|
||||
src = prev.fetchFromGitHub {
|
||||
owner = "JakeStanger";
|
||||
repo = "ironbar";
|
||||
rev = "58190ab079d00dd53babb72346f1da6e1cc9ac72";
|
||||
hash = "sha256-Se+Pg81W8R+SFGFlhF1dU+NnMWSdLo3nC9TdPHa2IL4=";
|
||||
rev = "92c690dcd14c21272f89bfde292546a2ee828e23";
|
||||
hash = "sha256-YFarQSZEIFpA1/9eRK4tm88mZYvWGIaAgCEAjazBO38=";
|
||||
};
|
||||
|
||||
patches = (oldAttrs.patches or [ ]) ++ [ ../assets/ironbar-fix-tray-crash.patch ];
|
||||
|
||||
cargoDeps = oldAttrs.cargoDeps.overrideAttrs (
|
||||
prev.lib.const {
|
||||
name = "${oldAttrs.pname}-${version}-vendor.tar.gz";
|
||||
inherit src;
|
||||
outputHash = "sha256-VkSznG2REXNhUKEVWwqlfA7BF9zXC+fxTgNeRfYaHi4=";
|
||||
outputHash = "sha256-wvjxKn2xS3qDJb7xVkLObr+Pz1djx+KHNSI66aonzpI=";
|
||||
}
|
||||
);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user