Skip to content

Commit bd2aead

Browse files
committed
Streamlined the onboarding process
1 parent 0378d48 commit bd2aead

File tree

4 files changed

+138
-25
lines changed

4 files changed

+138
-25
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ All notable changes to Window Glue will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [1.0.0] - 2025-07-07
8+
## [1.0.1] - 2025-07-07
9+
10+
### Fixed
11+
- Streamlined the onboarding process
12+
13+
## [1.0.0] - 2025-07-06
914

1015
### Added
1116
- Initial public release

Window Glue.xcodeproj/project.pbxproj

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
/* End PBXBuildFile section */
1313

1414
/* Begin PBXFileReference section */
15-
4D0C0DE02E16826F0090F5AE /* Window Glue.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; name = "Window Glue.app"; path = "/Users/conxt/Library/Mobile Documents/com~apple~CloudDocs/XCode/Window Glue/build/Debug/Window Glue.app"; sourceTree = "<absolute>"; };
1615
4D479E342E1A971000BE9B73 /* CHANGELOG.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = CHANGELOG.md; sourceTree = "<group>"; };
1716
4D479E352E1A971000BE9B73 /* CONTRIBUTING.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = CONTRIBUTING.md; sourceTree = "<group>"; };
1817
4D479E362E1A971000BE9B73 /* LICENSE */ = {isa = PBXFileReference; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; };
1918
4D479E372E1A971000BE9B73 /* PRIVACY.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = PRIVACY.md; sourceTree = "<group>"; };
2019
4D479E382E1A971000BE9B73 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
20+
4D8AA28D2E1B1B1700546A48 /* Window Glue.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Window Glue.app"; sourceTree = BUILT_PRODUCTS_DIR; };
2121
/* End PBXFileReference section */
2222

2323
/* Begin PBXFileSystemSynchronizedRootGroup section */
@@ -56,6 +56,7 @@
5656
4D479E362E1A971000BE9B73 /* LICENSE */,
5757
4D479E372E1A971000BE9B73 /* PRIVACY.md */,
5858
4D479E382E1A971000BE9B73 /* README.md */,
59+
4D8AA28D2E1B1B1700546A48 /* Window Glue.app */,
5960
);
6061
sourceTree = "<group>";
6162
};
@@ -83,7 +84,7 @@
8384
4D479E322E19959900BE9B73 /* Swindler */,
8485
);
8586
productName = "Window Glue";
86-
productReference = 4D0C0DE02E16826F0090F5AE /* Window Glue.app */;
87+
productReference = 4D8AA28D2E1B1B1700546A48 /* Window Glue.app */;
8788
productType = "com.apple.product-type.application";
8889
};
8990
/* End PBXNativeTarget section */
@@ -286,7 +287,7 @@
286287
CODE_SIGN_ENTITLEMENTS = "Window Glue/Window_Glue.entitlements";
287288
CODE_SIGN_STYLE = Automatic;
288289
COMBINE_HIDPI_IMAGES = YES;
289-
CURRENT_PROJECT_VERSION = 2025.7.1;
290+
CURRENT_PROJECT_VERSION = 2025.7.2;
290291
DEVELOPMENT_TEAM = 45QT7L9Q3U;
291292
ENABLE_HARDENED_RUNTIME = YES;
292293
ENABLE_PREVIEWS = YES;
@@ -300,7 +301,7 @@
300301
"@executable_path/../Frameworks",
301302
);
302303
MACOSX_DEPLOYMENT_TARGET = 13.0;
303-
MARKETING_VERSION = 1.0.0;
304+
MARKETING_VERSION = 1.0.1;
304305
PRODUCT_BUNDLE_IDENTIFIER = com.minttype.glue;
305306
PRODUCT_NAME = "$(TARGET_NAME)";
306307
REGISTER_APP_GROUPS = YES;
@@ -317,7 +318,7 @@
317318
CODE_SIGN_ENTITLEMENTS = "Window Glue/Window_Glue.entitlements";
318319
CODE_SIGN_STYLE = Automatic;
319320
COMBINE_HIDPI_IMAGES = YES;
320-
CURRENT_PROJECT_VERSION = 2025.7.1;
321+
CURRENT_PROJECT_VERSION = 2025.7.2;
321322
DEVELOPMENT_TEAM = 45QT7L9Q3U;
322323
ENABLE_HARDENED_RUNTIME = YES;
323324
ENABLE_PREVIEWS = YES;
@@ -331,7 +332,7 @@
331332
"@executable_path/../Frameworks",
332333
);
333334
MACOSX_DEPLOYMENT_TARGET = 13.0;
334-
MARKETING_VERSION = 1.0.0;
335+
MARKETING_VERSION = 1.0.1;
335336
PRODUCT_BUNDLE_IDENTIFIER = com.minttype.glue;
336337
PRODUCT_NAME = "$(TARGET_NAME)";
337338
REGISTER_APP_GROUPS = YES;

Window Glue/AppDelegate.swift

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
2323
private var windowMovements: [Swindler.Window: [WindowMovement]] = [:]
2424

2525
func applicationDidFinishLaunching(_ notification: Notification) {
26-
guard AXSwift.checkIsProcessTrusted(prompt: true) else {
26+
guard AXSwift.checkIsProcessTrusted(prompt: false) else {
2727
showAccessibilityAlert()
2828
return
2929
}
@@ -187,16 +187,46 @@ class AppDelegate: NSObject, NSApplicationDelegate {
187187
}
188188

189189
private func showAccessibilityAlert() {
190+
self.showAccessibilityAlertInternal(hasOpenedSettings: false)
191+
}
192+
193+
private func showAccessibilityAlertInternal(hasOpenedSettings: Bool) {
190194
let alert = NSAlert()
191195
alert.messageText = String(localized: "Accessibility Permission Required")
192-
alert.informativeText = String(localized: "Window Glue needs accessibility permissions to manage windows. Please enable it in System Settings > Privacy & Security > Accessibility.")
196+
alert.informativeText = String(localized: "Window Glue needs accessibility permissions to manage windows. Please enable it in System Settings > Privacy & Security > Accessibility, then quit and relaunch Window Glue.")
193197
alert.alertStyle = .warning
194-
alert.addButton(withTitle: String(localized: "Open System Settings"))
195-
alert.addButton(withTitle: String(localized: "Cancel"))
198+
199+
if !hasOpenedSettings {
200+
alert.addButton(withTitle: String(localized: "Open System Settings"))
201+
alert.addButton(withTitle: String(localized: "Cancel"))
202+
alert.addButton(withTitle: String(localized: "Quit and Relaunch"))
203+
} else {
204+
alert.addButton(withTitle: String(localized: "Cancel"))
205+
alert.addButton(withTitle: String(localized: "Quit and Relaunch"))
206+
}
196207

197208
let response = alert.runModal()
198-
if response == .alertFirstButtonReturn {
209+
210+
if !hasOpenedSettings && response == .alertFirstButtonReturn {
211+
// Open System Settings but don't close the dialog
199212
NSWorkspace.shared.open(URL(string: "x-apple.systempreferences:com.apple.preference.security?Privacy_Accessibility")!)
213+
// Wait a moment to allow System Settings to come forward, then show dialog again
214+
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
215+
if !AXSwift.checkIsProcessTrusted(prompt: false) {
216+
self.showAccessibilityAlertInternal(hasOpenedSettings: true)
217+
}
218+
}
219+
} else if (!hasOpenedSettings && response == .alertSecondButtonReturn) || (hasOpenedSettings && response == .alertFirstButtonReturn) {
220+
// Cancel - continue without permissions
221+
return
222+
} else if (!hasOpenedSettings && response == .alertThirdButtonReturn) || (hasOpenedSettings && response == .alertSecondButtonReturn) {
223+
// Quit and Relaunch
224+
let appPath = Bundle.main.bundlePath
225+
let task = Process()
226+
task.launchPath = "/usr/bin/open"
227+
task.arguments = [appPath]
228+
task.launch()
229+
NSApplication.shared.terminate(nil)
200230
}
201231
}
202232
}

Window Glue/Localizable.xcstrings

Lines changed: 90 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -940,6 +940,83 @@
940940
}
941941
}
942942
},
943+
"Quit and Relaunch" : {
944+
"comment" : "Button in Accessibility permission request",
945+
"localizations" : {
946+
"de" : {
947+
"stringUnit" : {
948+
"state" : "translated",
949+
"value" : "Beenden und Neustarten"
950+
}
951+
},
952+
"es" : {
953+
"stringUnit" : {
954+
"state" : "translated",
955+
"value" : "Salir y Reiniciar"
956+
}
957+
},
958+
"fr" : {
959+
"stringUnit" : {
960+
"state" : "translated",
961+
"value" : "Quitter et Relancer"
962+
}
963+
},
964+
"it" : {
965+
"stringUnit" : {
966+
"state" : "translated",
967+
"value" : "Esci e Riavvia"
968+
}
969+
},
970+
"ja" : {
971+
"stringUnit" : {
972+
"state" : "translated",
973+
"value" : "終了して再起動"
974+
}
975+
},
976+
"nb" : {
977+
"stringUnit" : {
978+
"state" : "translated",
979+
"value" : "Avslutt og Start på nytt"
980+
}
981+
},
982+
"nl" : {
983+
"stringUnit" : {
984+
"state" : "translated",
985+
"value" : "Afsluiten en Herstarten"
986+
}
987+
},
988+
"pl" : {
989+
"stringUnit" : {
990+
"state" : "translated",
991+
"value" : "Zakończ i Uruchom ponownie"
992+
}
993+
},
994+
"pt-BR" : {
995+
"stringUnit" : {
996+
"state" : "translated",
997+
"value" : "Sair e Reiniciar"
998+
}
999+
},
1000+
"pt-PT" : {
1001+
"stringUnit" : {
1002+
"state" : "translated",
1003+
"value" : "Sair e Reiniciar"
1004+
}
1005+
},
1006+
"sv" : {
1007+
"stringUnit" : {
1008+
"state" : "translated",
1009+
"value" : "Avsluta och Starta om"
1010+
}
1011+
},
1012+
"uk" : {
1013+
"stringUnit" : {
1014+
"state" : "translated",
1015+
"value" : "Закрити та перезапустити"
1016+
}
1017+
}
1018+
}
1019+
},
9431020
"Quit Window Glue" : {
9441021
"comment" : "Quit menu item",
9451022
"localizations" : {
@@ -1570,79 +1647,79 @@
15701647
"Window Glue" : {
15711648
"shouldTranslate" : false
15721649
},
1573-
"Window Glue needs accessibility permissions to manage windows. Please enable it in System Settings > Privacy & Security > Accessibility." : {
1650+
"Window Glue needs accessibility permissions to manage windows. Please enable it in System Settings > Privacy & Security > Accessibility, then quit and relaunch Window Glue." : {
15741651
"comment" : "Accessibility permission request text",
15751652
"localizations" : {
15761653
"de" : {
15771654
"stringUnit" : {
15781655
"state" : "translated",
1579-
"value" : "Window Glue benötigt Barrierefreiheitsberechtigungen zur Fensterverwaltung. Bitte aktivieren Sie dies in Systemeinstellungen > Datenschutz & Sicherheit > Barrierefreiheit."
1656+
"value" : "Window Glue benötigt Barrierefreiheitsberechtigungen zur Fensterverwaltung. Bitte aktivieren Sie dies in Systemeinstellungen > Datenschutz & Sicherheit > Barrierefreiheit und beenden und starten Sie dann Window Glue neu."
15801657
}
15811658
},
15821659
"es" : {
15831660
"stringUnit" : {
15841661
"state" : "translated",
1585-
"value" : "Window Glue necesita permisos de accesibilidad para gestionar ventanas. Por favor, actívalo en Configuración del Sistema > Privacidad y Seguridad > Accesibilidad."
1662+
"value" : "Window Glue necesita permisos de accesibilidad para gestionar ventanas. Por favor, actívalo en Configuración del Sistema > Privacidad y Seguridad > Accesibilidad, luego sal y reinicia Window Glue."
15861663
}
15871664
},
15881665
"fr" : {
15891666
"stringUnit" : {
15901667
"state" : "translated",
1591-
"value" : "Window Glue a besoin d'autorisations d'accessibilité pour gérer les fenêtres. Veuillez l'activer dans Réglages Système > Confidentialité et Sécurité > Accessibilité."
1668+
"value" : "Window Glue a besoin d'autorisations d'accessibilité pour gérer les fenêtres. Veuillez l'activer dans Réglages Système > Confidentialité et Sécurité > Accessibilité, puis quittez et relancez Window Glue."
15921669
}
15931670
},
15941671
"it" : {
15951672
"stringUnit" : {
15961673
"state" : "translated",
1597-
"value" : "Window Glue necessita delle autorizzazioni di accessibilità per gestire le finestre. Abilitalo in Impostazioni di Sistema > Privacy e Sicurezza > Accessibilità."
1674+
"value" : "Window Glue necessita delle autorizzazioni di accessibilità per gestire le finestre. Abilitalo in Impostazioni di Sistema > Privacy e Sicurezza > Accessibilità, poi esci e riavvia Window Glue."
15981675
}
15991676
},
16001677
"ja" : {
16011678
"stringUnit" : {
16021679
"state" : "translated",
1603-
"value" : "Window Glueがウィンドウを管理するにはアクセシビリティ権限が必要です。システム設定 > プライバシーとセキュリティ > アクセシビリティで有効にしてください。"
1680+
"value" : "Window Glueがウィンドウを管理するにはアクセシビリティ権限が必要です。システム設定 > プライバシーとセキュリティ > アクセシビリティで有効にしてから、Window Glueを終了して再起動してください。"
16041681
}
16051682
},
16061683
"nb" : {
16071684
"stringUnit" : {
16081685
"state" : "translated",
1609-
"value" : "Window Glue trenger tilgjengelighetstillatelser for å administrere vinduer. Aktiver det i Systeminnstillinger > Personvern og sikkerhet > Tilgjengelighet."
1686+
"value" : "Window Glue trenger tilgjengelighetstillatelser for å administrere vinduer. Aktiver det i Systeminnstillinger > Personvern og sikkerhet > Tilgjengelighet, og avslutt og start deretter Window Glue på nytt."
16101687
}
16111688
},
16121689
"nl" : {
16131690
"stringUnit" : {
16141691
"state" : "translated",
1615-
"value" : "Window Glue heeft toegankelijkheidsmachtigingen nodig om vensters te beheren. Schakel dit in via Systeeminstellingen > Privacy & Beveiliging > Toegankelijkheid."
1692+
"value" : "Window Glue heeft toegankelijkheidsmachtigingen nodig om vensters te beheren. Schakel dit in via Systeeminstellingen > Privacy & Beveiliging > Toegankelijkheid, en sluit en herstart daarna Window Glue."
16161693
}
16171694
},
16181695
"pl" : {
16191696
"stringUnit" : {
16201697
"state" : "translated",
1621-
"value" : "Window Glue wymaga uprawnień dostępności do zarządzania oknami. Włącz to w Ustawienia systemu > Prywatność i bezpieczeństwo > Dostępność."
1698+
"value" : "Window Glue wymaga uprawnień dostępności do zarządzania oknami. Włącz to w Ustawienia systemu > Prywatność i bezpieczeństwo > Dostępność, a następnie zakończ i uruchom ponownie Window Glue."
16221699
}
16231700
},
16241701
"pt-BR" : {
16251702
"stringUnit" : {
16261703
"state" : "translated",
1627-
"value" : "O Window Glue precisa de permissões de acessibilidade para gerenciar janelas. Ative-o em Configurações do Sistema > Privacidade e Segurança > Acessibilidade."
1704+
"value" : "O Window Glue precisa de permissões de acessibilidade para gerenciar janelas. Ative-o em Configurações do Sistema > Privacidade e Segurança > Acessibilidade, depois saia e reinicie o Window Glue."
16281705
}
16291706
},
16301707
"pt-PT" : {
16311708
"stringUnit" : {
16321709
"state" : "translated",
1633-
"value" : "O Window Glue necessita de autorizações de acessibilidade para gerir janelas. Active-o em Definições do Sistema > Privacidade e Segurança > Acessibilidade."
1710+
"value" : "O Window Glue necessita de autorizações de acessibilidade para gerir janelas. Active-o em Definições do Sistema > Privacidade e Segurança > Acessibilidade, depois saia e reinicie o Window Glue."
16341711
}
16351712
},
16361713
"sv" : {
16371714
"stringUnit" : {
16381715
"state" : "translated",
1639-
"value" : "Window Glue behöver tillgänglighetsbehörigheter för att hantera fönster. Aktivera det i Systeminställningar > Integritet och säkerhet > Tillgänglighet."
1716+
"value" : "Window Glue behöver tillgänglighetsbehörigheter för att hantera fönster. Aktivera det i Systeminställningar > Integritet och säkerhet > Tillgänglighet, avsluta sedan och starta om Window Glue."
16401717
}
16411718
},
16421719
"uk" : {
16431720
"stringUnit" : {
16441721
"state" : "translated",
1645-
"value" : "Window Glue потребує дозволів доступності для управління вікнами. Будь ласка, увімкніть його в Налаштування системи > Конфіденційність і безпека > Доступність."
1722+
"value" : "Window Glue потребує дозволів доступності для управління вікнами. Будь ласка, увімкніть це в Налаштування системи > Конфіденційність і безпека > Доступність, а потім закрийте та перезапустіть Window Glue."
16461723
}
16471724
}
16481725
}

0 commit comments

Comments
 (0)