Heya, I’ve been using GTK-rs to make a custom start menu for my Linux desktop. Its been a smooth process with everything “just working” for the most part. I’m currently trying to make it so that if i click off of the menu, it closes. However, I’ve tried every event I can think of, and none of them are firing when I click on a different window.
Heres how I’m initializing my window:
// In gtk-rs, you set the window type with type_() // because type is a reserved keyword in Rust. // ALSO: using a popup window is NECESSARY for what I'm doing, // because otherwise the window will be manhandled by BSPWM. let win = gtk::ApplicationWindowBuilder::new() .application(app) .type_(gtk::WindowType::Popup) .title("launcher") .default_width(400) // This is changed later to make the window look like its expanding. .default_height(0) .decorated(false) .build(); win.set_keep_above(true); win.stick();
Heres a list of a few functions I’ve tried:
Either I’m doing something really dumb, or GTK doesn’t fire these events for popup windows, in which case I’m out of luck. If anyone knows a solution, I’d be really appreciative.