Launcher appears on correct display, Action centre can be triggered by control command
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user