From aa90e4527ba45e13e4f09c33d59aeca821d0a682 Mon Sep 17 00:00:00 2001 From: sdaqo Date: Fri, 17 May 2024 17:56:37 +0200 Subject: [PATCH] fix transparancy on x11 --- Cargo.lock | 2 +- src/app/ctxmenu/mod.rs | 2 +- src/main.rs | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d2787d9..87439c2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -852,7 +852,7 @@ dependencies = [ [[package]] name = "mpv-subs-popout" -version = "0.4.1" +version = "0.4.2" dependencies = [ "glib-build-tools", "gtk", diff --git a/src/app/ctxmenu/mod.rs b/src/app/ctxmenu/mod.rs index 322958c..c093eaf 100644 --- a/src/app/ctxmenu/mod.rs +++ b/src/app/ctxmenu/mod.rs @@ -225,7 +225,7 @@ pub fn build_ctxmenu(window: &MpvSubsWindow) -> ContextMenu { Some(&window) ); - let res =color_chooser.run(); + let res = color_chooser.run(); if res != gtk::ResponseType::Ok { color_chooser.close(); diff --git a/src/main.rs b/src/main.rs index 803533c..9d5387b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -30,6 +30,11 @@ fn main() { application.connect_activate(|app| { let window = build_window(app); + window.set_visual( + GtkWindowExt::screen(&window) + .unwrap() + .rgba_visual().as_ref() + ); window.show_all(); load_settings(&window);