Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port to GTK4 #105

Merged
merged 14 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
616 changes: 244 additions & 372 deletions Cargo.lock

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ toml = "0.8"
serde = "1"
serde_derive = "1"
# GUI Dependencies
gtk = "0.17.1"
gtk-layer-shell = "0.6.1"
gtk = { package = "gtk4", version = "0.9.1" }
gtk-layer-shell = { package = "gtk4-layer-shell", version = "0.4.0" }
shrinkwraprs = "0.3.0"
cascade = "1.0.1"
pulse = { version = "2.26.0", package = "libpulse-binding" }
Expand All @@ -41,3 +41,4 @@ nix = "0.26.2"
blight = "0.7.0"
anyhow = "1.0.75"
thiserror = "1.0.49"
async-channel = "2.3.1"
2 changes: 1 addition & 1 deletion rustfmt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ color = "Auto"
unstable_features = false
disable_all_formatting = false
skip_children = false
hide_parse_errors = false
show_parse_errors = true
error_on_line_overflow = false
error_on_unformatted = false
ignore = []
Expand Down
4 changes: 2 additions & 2 deletions src/client/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ use gtk::{gio::ApplicationFlags, Application};
use gtk::{glib, prelude::*};
use std::env::args_os;
use std::path::PathBuf;
use zbus::{blocking::Connection, dbus_proxy};
use zbus::{blocking::Connection, proxy};

#[dbus_proxy(
#[proxy(
interface = "org.erikreider.swayosd",
default_service = "org.erikreider.swayosd-server",
default_path = "/org/erikreider/swayosd"
Expand Down
6 changes: 3 additions & 3 deletions src/input-backend/dbus_server.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use zbus::{dbus_interface, Connection, ConnectionBuilder, SignalContext};
use zbus::{interface, Connection, ConnectionBuilder, SignalContext};

use crate::config::{DBUS_BACKEND_NAME, DBUS_PATH};

pub struct DbusServer;

#[dbus_interface(name = "org.erikreider.swayosd")]
#[interface(name = "org.erikreider.swayosd")]
impl DbusServer {
#[dbus_interface(signal)]
#[zbus(signal)]
pub async fn key_pressed(
signal_ctxt: &SignalContext<'_>,
key_code: u16,
Expand Down
Loading