mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-04-24 17:48:34 +02:00
fix(wm): hard code unreal engine ws handling
This commit introduces a temporary hard-coded fix for handling minimizing and restoration for UnrealEditor.exe when switching workspaces. re #211
This commit is contained in:
@@ -88,7 +88,15 @@ impl Workspace {
|
|||||||
pub fn hide(&mut self) {
|
pub fn hide(&mut self) {
|
||||||
for container in self.containers_mut() {
|
for container in self.containers_mut() {
|
||||||
for window in container.windows_mut() {
|
for window in container.windows_mut() {
|
||||||
window.hide();
|
if let (Ok(exe), Ok(title)) = (window.exe(), window.title()) {
|
||||||
|
if exe == "UnrealEditor.exe" {
|
||||||
|
if title.ends_with(" - Unreal Editor") {
|
||||||
|
window.hide();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
window.hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -112,7 +120,15 @@ impl Workspace {
|
|||||||
let mut to_focus = None;
|
let mut to_focus = None;
|
||||||
for (i, container) in self.containers_mut().iter_mut().enumerate() {
|
for (i, container) in self.containers_mut().iter_mut().enumerate() {
|
||||||
if let Some(window) = container.focused_window_mut() {
|
if let Some(window) = container.focused_window_mut() {
|
||||||
window.restore();
|
if let (Ok(exe), Ok(title)) = (window.exe(), window.title()) {
|
||||||
|
if exe == "UnrealEditor.exe" {
|
||||||
|
if title.ends_with(" - Unreal Editor") {
|
||||||
|
window.restore();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
window.restore();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if idx == i {
|
if idx == i {
|
||||||
to_focus = Option::from(*window);
|
to_focus = Option::from(*window);
|
||||||
|
|||||||
Reference in New Issue
Block a user