mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-01-15 06:13:36 +01:00
Compare commits
2 Commits
feature/eg
...
feature/fo
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e2b7079755 | ||
|
|
b8b3b3d615 |
@@ -184,7 +184,8 @@ impl WindowManager {
|
||||
}
|
||||
|
||||
match event {
|
||||
WindowManagerEvent::Raise(_window) => {
|
||||
WindowManagerEvent::Raise(window) => {
|
||||
window.focus(false)?;
|
||||
self.has_pending_raise_op = false;
|
||||
}
|
||||
WindowManagerEvent::Destroy(_, window) | WindowManagerEvent::Unmanage(window) => {
|
||||
|
||||
@@ -304,22 +304,30 @@ pub struct StaticConfig {
|
||||
/// Set display index preferences
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub display_index_preferences: Option<HashMap<usize, String>>,
|
||||
/// Stackbar configuration options
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub stackbar: Option<StackbarConfig>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, JsonSchema)]
|
||||
pub struct TabsConfig {
|
||||
/// Width of a stackbar tab
|
||||
width: Option<i32>,
|
||||
/// Focused tab text colour
|
||||
focused_text: Option<Colour>,
|
||||
/// Unfocused tab text colour
|
||||
unfocused_text: Option<Colour>,
|
||||
/// Tab background colour
|
||||
background: Option<Colour>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, JsonSchema)]
|
||||
pub struct StackbarConfig {
|
||||
/// Stackbar height
|
||||
pub height: Option<i32>,
|
||||
/// Stackbar mode
|
||||
pub mode: Option<StackbarMode>,
|
||||
/// Stackbar tab configuration options
|
||||
pub tabs: Option<TabsConfig>,
|
||||
}
|
||||
|
||||
|
||||
@@ -774,14 +774,11 @@ impl WindowManager {
|
||||
pub fn raise_window_at_cursor_pos(&mut self) -> Result<()> {
|
||||
let mut hwnd = None;
|
||||
|
||||
for monitor in self.monitors() {
|
||||
for workspace in monitor.workspaces() {
|
||||
if let Some(container_idx) = workspace.container_idx_from_current_point() {
|
||||
if let Some(container) = workspace.containers().get(container_idx) {
|
||||
if let Some(window) = container.focused_window() {
|
||||
hwnd = Some(window.hwnd);
|
||||
}
|
||||
}
|
||||
let workspace = self.focused_workspace()?;
|
||||
if let Some(container_idx) = workspace.container_idx_from_current_point() {
|
||||
if let Some(container) = workspace.containers().get(container_idx) {
|
||||
if let Some(window) = container.focused_window() {
|
||||
hwnd = Some(window.hwnd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user