From 77adfbca6b3ece5b4872138d48c90d738d2afa90 Mon Sep 17 00:00:00 2001 From: elkowar <5300871+elkowar@users.noreply.github.com> Date: Thu, 26 May 2022 13:17:11 +0200 Subject: [PATCH] Set window class to window name --- crates/eww/src/app.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/eww/src/app.rs b/crates/eww/src/app.rs index 174fa4c..3f73003 100644 --- a/crates/eww/src/app.rs +++ b/crates/eww/src/app.rs @@ -317,11 +317,10 @@ impl App { None, )?; - root_widget.style_context().add_class(&window_name.to_string()); - let monitor_geometry = get_monitor_geometry(monitor.or(window_def.monitor_number))?; let eww_window = initialize_window(monitor_geometry, root_widget, window_def, window_scope)?; + eww_window.gtk_window.style_context().add_class(&window_name.to_string()); // initialize script var handlers for variables that where not used before opening this window. // TODO maybe this could be handled by having a track_newly_used_variables function in the scope tree?