diff --git a/Cargo.toml b/Cargo.toml index dbb3dab..22c43eb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,6 @@ members = [ "locker", "dbus-service", "dialog-gtk3", -# "dialog-gtk4", # "dialog-iced", "util", "systemd", diff --git a/dialog-gtk4/Cargo.toml b/dialog-gtk4/Cargo.toml deleted file mode 100644 index 3670e90..0000000 --- a/dialog-gtk4/Cargo.toml +++ /dev/null @@ -1,9 +0,0 @@ -[package] -name = "bscreensaver-dialog-gtk4" -version = "0.1.0" -edition = "2021" - -[dependencies] -gtk = { version = "0.4", package = "gtk4", features = ["v4_6"]} -gdk-x11 = { version = "0.4", package = "gdk4-x11", features = ["v4_4", "xlib"]} -x11 = "2.19" diff --git a/dialog-gtk4/src/main.rs b/dialog-gtk4/src/main.rs deleted file mode 100644 index 3933f19..0000000 --- a/dialog-gtk4/src/main.rs +++ /dev/null @@ -1,43 +0,0 @@ -use gdk_x11::{X11Surface, X11Display}; -use gtk::{prelude::*, Application, ApplicationWindow, Label}; -use std::process::exit; - -fn main() { - let app = Application::builder() - .application_id("org.spurint.bscreensaver.dialog-gtk4") - .build(); - app.connect_activate(build_ui); - - app.run(); -} - -fn build_ui(app: &Application) { - let titlebar = Label::builder() - .label("Unlock Screen") - .halign(gtk::Align::Center) - .single_line_mode(true) - .build(); - titlebar.show(); - - let window = ApplicationWindow::builder() - .application(app) - .titlebar(&titlebar) - .modal(true) - .decorated(false) - .build(); - window.realize(); - - let surface = unsafe { window.surface().unsafe_cast::() }; - let xid = surface.xid(); - if xid == 0 { - eprintln!("Lock dialog has no XID"); - exit(1); - } - println!("{}", surface.xid()); - - let mut buf = String::new(); - let stdin = std::io::stdin(); - stdin.read_line(&mut buf).unwrap(); - - window.present(); -}