Launcher appears on correct display, Action centre can be triggered by control command

This commit is contained in:
jmb05
2026-11-02 19:55:43 +01:00
parent f46c2408a5
commit 541ce5ccb2
5 changed files with 33 additions and 15 deletions

View File

@@ -2,6 +2,7 @@ use crate::backend::BackendChannels;
use crate::backend::network::{
Auth, AuthType, ConnectError, NetworkCommand, NetworkInfo, NetworkState,
};
use crate::backend::window_manager_hypr::HyprlandComms;
use crate::ui::widgets::{LabelEntry, WifiWidget};
use glib::prelude::Cast;
use glib::{ControlFlow, clone};
@@ -58,7 +59,7 @@ impl ActionCentre {
window.set_margin(Edge::Top, 20);
window.set_margin(Edge::Right, 20);
window.set_margin(Edge::Bottom, 20);
window.set_keyboard_mode(KeyboardMode::OnDemand);
window.set_keyboard_mode(KeyboardMode::Exclusive);
let instance = Self {
window: window.clone(),
@@ -318,6 +319,16 @@ impl ActionCentre {
}
}
pub fn show_action_centre_active_monitor(&self) {
let Some(display) = Display::default() else {
return;
};
let Some(monitor) = HyprlandComms::cursor_monitor() else {
return;
};
self.show_action_centre(monitor as u32, &display);
}
pub fn show_action_centre(&self, monitor_idx: u32, display: &Display) {
let window = &self.window;
let monitors = display.monitors();