Skip to content

Commit

Permalink
Update the gtk libraries to 0.17 (#747)
Browse files Browse the repository at this point in the history
  • Loading branch information
ettancos authored Aug 18, 2023
1 parent c94b40d commit 393f7fa
Show file tree
Hide file tree
Showing 8 changed files with 165 additions and 235 deletions.
104 changes: 57 additions & 47 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 9 additions & 8 deletions crates/eww/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,18 @@ x11 = ["gdkx11", "x11rb"]
wayland = ["gtk-layer-shell"]

[dependencies]
gtk = { version = "0.15", features = [ "v3_22" ] }
gdk = "0.15"
glib = "0.15"
gtk = "0.17.1"
gdk = "0.17.1"
glib = "0.17.8"
glib-macros = "0.17.8"

cairo-rs = "0.15"
cairo-sys-rs = "0.15.1"
cairo-rs = "0.17"
cairo-sys-rs = "0.17"

gdk-pixbuf = "0.15"
gdk-pixbuf = "0.17"

gtk-layer-shell = { version = "0.4", optional = true}
gdkx11 = { version = "0.15", optional = true }
gtk-layer-shell = { version = "0.6.1", optional = true }
gdkx11 = { version = "0.17", optional = true }
x11rb = { version = "0.11.1", features = ["randr"], optional = true }

regex = "1.9.3"
Expand Down
5 changes: 2 additions & 3 deletions crates/eww/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crate::{
daemon_response::DaemonResponseSender,
display_backend::DisplayBackend,
error_handling_ctx,
gtk::prelude::{ContainerExt, CssProviderExt, GtkWindowExt, StyleContextExt, WidgetExt},
gtk::prelude::{ContainerExt, CssProviderExt, GtkWindowExt, MonitorExt, StyleContextExt, WidgetExt},
paths::EwwPaths,
script_var_handler::ScriptVarHandlerHandle,
state::scope_graph::{ScopeGraph, ScopeIndex},
Expand Down Expand Up @@ -505,8 +505,7 @@ fn apply_window_position(
}

fn on_screen_changed(window: &gtk::Window, _old_screen: Option<&gdk::Screen>) {
let visual = window
.screen()
let visual = gtk::prelude::GtkWindowExt::screen(window)
.and_then(|screen| screen.rgba_visual().filter(|_| screen.is_composited()).or_else(|| screen.system_visual()));
window.set_visual(visual.as_ref());
}
Expand Down
3 changes: 0 additions & 3 deletions crates/eww/src/display_backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,6 @@ mod platform_x11 {
let window_type =
if window_def.backend_options.x11.wm_ignore { gtk::WindowType::Popup } else { gtk::WindowType::Toplevel };
let window = gtk::Window::new(window_type);
let wm_class_name = format!("eww-{}", window_def.name);
#[allow(deprecated)]
window.set_wmclass(&wm_class_name, &wm_class_name);
window.set_resizable(window_def.resizable);
window.set_keep_above(window_def.stacking == WindowStacking::Foreground);
window.set_keep_below(window_def.stacking == WindowStacking::Background);
Expand Down
Loading

0 comments on commit 393f7fa

Please sign in to comment.