Compare commits

...

1 Commits

Author SHA1 Message Date
LGUG2Z
ddfc44a788 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
2022-08-23 10:46:51 -07:00

View File

@@ -88,7 +88,15 @@ impl Workspace {
pub fn hide(&mut self) {
for container in self.containers_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;
for (i, container) in self.containers_mut().iter_mut().enumerate() {
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 {
to_focus = Option::from(*window);