Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: added option cross-workspace-floating-windows to allow floating windows to exist across workspaces #684

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Sources/AppBundle/config/Config.swift
Original file line number Diff line number Diff line change
@@ -40,6 +40,7 @@ struct Config: Copyable {
var defaultRootContainerOrientation: DefaultContainerOrientation = .auto
var startAtLogin: Bool = false
var automaticallyUnhideMacosHiddenApps: Bool = false
var crossWorkspaceFloatingWindows: Bool = false
var accordionPadding: Int = 30
var enableNormalizationOppositeOrientationForNestedContainers: Bool = true
var execOnWorkspaceChange: [String] = [] // todo deprecate
1 change: 1 addition & 0 deletions Sources/AppBundle/config/parseConfig.swift
Original file line number Diff line number Diff line change
@@ -102,6 +102,7 @@ private let configParser: [String: any ParserProtocol<Config>] = [

"start-at-login": Parser(\.startAtLogin, parseBool),
"automatically-unhide-macos-hidden-apps": Parser(\.automaticallyUnhideMacosHiddenApps, parseBool),
"cross-workspace-floating-windows": Parser(\.crossWorkspaceFloatingWindows, parseBool),
"accordion-padding": Parser(\.accordionPadding, parseInt),
"exec-on-workspace-change": Parser(\.execOnWorkspaceChange, parseExecOnWorkspaceChange),
"exec": Parser(\.execConfig, parseExecConfig),
8 changes: 7 additions & 1 deletion Sources/AppBundle/normalizeLayoutReason.swift
Original file line number Diff line number Diff line change
@@ -33,7 +33,13 @@ private func _normalizeLayoutReason(workspace: Workspace, windows: [Window]) {
window.bind(to: macosMinimizedWindowsContainer, adaptiveWeight: 1, index: INDEX_BIND_LAST)
} else if isMacosWindowOfHiddenApp {
window.layoutReason = .macos(prevParentKind: window.parent.kind)
window.bind(to: workspace.macOsNativeHiddenAppsWindowsContainer, adaptiveWeight: 1, index: INDEX_BIND_LAST)
if !config.crossWorkspaceFloatingWindows || window.parent.kind != .workspace {
window.bind(to: workspace.macOsNativeHiddenAppsWindowsContainer, adaptiveWeight: 1, index: INDEX_BIND_LAST)
} else {
window.bind(to: macosMinimizedWindowsContainer, adaptiveWeight: 1, index: INDEX_BIND_LAST)
}
} else if config.crossWorkspaceFloatingWindows && window.parent.kind == .workspace {
window.bindAsFloatingWindow(to: focus.workspace)
}
case .macos(let prevParentKind):
if !isMacosFullscreen && !isMacosMinimized && !isMacosWindowOfHiddenApp {