evilsocket / evilsocket/clipbud
[linux] panic at startup: gtk_icon_theme_get_for_screen failed
- Dominant language
- Rust
- Stars
- 59
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
Using the example config in readme.
Setup: archlinux/i3. Trying building from src, same issue.
```
RUST_BACKTRACE=1 clipbud -c clipbud-config.toml
loading config from: clipbud-config.toml
clipboard observer started...
(process:78783): Gtk-CRITICAL **: 07:15:42.737: gtk_icon_theme_get_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
(process:78783): GLib-GObject-CRITICAL **: 07:15:42.737: invalid (NULL) pointer instance
(process:78783): GLib-GObject-CRITICAL **: 07:15:42.737: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
thread 'main' panicked at /home/anh/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/gtk-0.18.2/src/auto/menu.rs:29:9:
GTK has not been initialized. Call `gtk::init` first.
stack backtrace:
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Aborted (core dumped) RUST_BACKTRACE=1 clipbud -c clipbud-config.toml
```
if i do gtk::init myself (after `crate add gtk`), it runs but the windows is black
```
diff --git a/src/ui/tray.rs b/src/ui/tray.rs
index 6f44b72..42c2945 100644
--- a/src/ui/tray.rs
+++ b/src/ui/tray.rs
@@ -4,6 +4,8 @@ use tray_icon::{
};
pub(crate) fn build_tray_menu_icon() -> anyhow::Result<(TrayIcon, MenuItem)> {
+ gtk::init().unwrap();
+
let tray_menu = Menu::new();
let quit_menu_item = MenuItem::new("Quit", true, None);
```
which looks like this
At this point, I guess, it's because I'm using i3 and the way this work clipbud makes itself visible / off screen but i3 force its to show (because tiling window manager)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.