32 Commits

Author SHA1 Message Date
Daniel Anderson
1058c17511 Fix a crash on iOS 26 when the scene's keyWindow is nil at cold start.
On iOS 26, `UIWindowScene.keyWindow` can be nil during scene connection
until the scene becomes active. The implicitly-unwrapped `mainWindow`
then crashes on the next line. Fall back to `scene.windows.first`, which
is the SwiftUI WindowGroup's window and is already attached to the scene
at this point.
2026-05-05 12:08:30 +02:00
Doug
6cfcd7d41f Fixes for multi-window support. (#5528)
* Correctly handle the re-opening of the main window.

Add an additional safe-guard to ensure only one main window exists.
Make sure all secondary windows use the correct tint colour.

* Fix a bug where the settings screen isn't shown on macOS when the AppLock feature is enabled.
2026-05-01 14:44:04 +01:00
Stefan Ceriu
51d9c4e13a #5504 - Add logs around route handling and the global search window presentation 2026-04-30 13:00:35 +03:00
Stefan Ceriu
64614cdfb5 Rename "Auxiliary" windows to "Secondary" windows 2026-03-31 20:33:33 +03:00
Stefan Ceriu
d52f392758 Disable multiple windows when screen lock is enabled. 2026-03-31 20:33:33 +03:00
Stefan Ceriu
2b2b926fdc Clean up the window manager and its protocols 2026-03-31 20:33:33 +03:00
Stefan Ceriu
685d2d083c Dismiss a room's window when its flow finishes as there's no longer a reason for it to be alive. 2026-03-31 20:33:33 +03:00
Stefan Ceriu
92ebfed4e1 Programatically focus the main window when invoking the global search 2026-03-31 20:33:33 +03:00
Stefan Ceriu
aae95a9489 Best effort attempt at cleaning up the WindowManger registered coordinators. 2026-03-31 20:33:33 +03:00
Stefan Ceriu
a33c2b6f39 Prevent the window manager from being setup more than once. 2026-03-31 20:33:33 +03:00
Stefan Ceriu
b034fffb1f Close all secondary windows on logout 2026-03-31 20:33:33 +03:00
Stefan Ceriu
c66e737ee0 Automatically dismiss (now) empty windows 2026-03-31 20:33:33 +03:00
Stefan Ceriu
12b6b7ec74 Introduce support for multiple windows on mac and iPad OS
Once the app starts the WindowManager is configured with SwiftUI's environment OpenWindowAction. It can then be used to register coordinators (that provide the toPresentable view) and an optional flow coordinator (as most of the screens are part of a flow, especially rooms).
Once a coordinator is registed, the WindowManager invokes the OpenWindowAction which in turn makes the Application call its newly introduced WindowManagerWindowType WindowGroup's block to instantiate a new visual window rooting that view.

The WindowManager is also responsible for wrapping the presentable in a disappearance block and clean up the coordinator stack.

# Conflicts:
#	ElementX/Sources/Application/AppCoordinator.swift
2026-03-31 20:33:33 +03:00
Stefan Ceriu
b49bf20c2c Make the PassthroughWindow work correctly on iOS 26
As opposed to passing through all the touches; as per https://stackoverflow.com/a/79768998/730924
2026-02-10 12:17:16 +02:00
Mauro
6160c44d67 Update copyright holding and dates (#4640)
* Update copyright holding and dates

* compound IDE Macros updated

* update copyright

* update copyrights done

* update templates and README
2025-10-21 14:34:56 +02:00
manuroe
c29f4cc9b4 Dual licensing: AGPL + Element Commercial (#3657)
* New LICENSE-COMMERCIAL file

* Apply dual licenses: AGPL + Element Commercial to file headers

* Update README with dual licensing
2025-01-06 11:27:37 +01:00
Stefan Ceriu
89eae00479 Switch license to AGPL (#3237)
* Switch license file to AGPL

* Update file copyright headers

* Update the default project file header
2024-09-06 16:34:30 +03:00
Stefan Ceriu
66a36a76bf Cleanup following the AppMediator introduction (#2723)
- stop using multiple background task, the appCoordinator sync one is enough for the whole app
- move the AppMeditor to the MainActor
- expose the WindowManager through the AppMediator
- hide sensitive WindowManager API behind a different protocol
- remove the now unnecessary `BackgroundTaskService`
2024-04-22 18:10:24 +03:00
Doug
915f0b55c3 Hard code the room flow to a single room proxy. (#2599)
* Don't give the room flow a split coordinator any more.
2024-03-27 10:56:58 +00:00
Stefan Ceriu
b311d18114 Add support for quick room search through the Cmd+K shortcut (#2363) 2024-01-29 14:55:11 +02:00
Mauro
3e8a423fcc Lock screen rotation for the camera (#2353) 2024-01-18 13:24:15 +00:00
Stefan Ceriu
62ea0f5fd4 Add a protocol for the WindowManager 2024-01-08 13:08:17 +02:00
Mauro
bc97bdeea5 Removing dead code part 3 (#2264) 2023-12-19 12:12:16 +01:00
Doug
5b55ce4e8c Fix a bug where the Screen lock placeholder could be slow. (#2155)
* Only use the Task for the delayed window changes.
The timing was off with the Task when locking the device with the app open.

* Check the application state before unlocking the app.
On top of a), the app will reveal itself if you background during the success animation, b) the flow is run farrrr too many times, so the app is revealing itself way before the Face ID scan UI is complete - definitely need a state machine here.
2023-11-22 18:58:14 +00:00
Doug
f7be3b5121 Show the lock screen placeholder on willResignActive. (#2086) 2023-11-15 15:31:35 +00:00
Stefan Ceriu
a846c30305 Fixes #2083 - Expose options for overriding the system appearance in the advanced settings menu 2023-11-15 14:23:11 +02:00
Doug
871726aacc Add UI tests for AppLockFlowCoordinator. (#2055)
* Add UITests for the App Lock flow.

* Add Notification Signal

Fix unwanted imports in UITests.
2023-11-10 15:38:54 +00:00
Stefan Ceriu
fc14364016 Fix alerts presented by the user indicator controller not being inter… (#2056)
* Fix alerts presented by the user indicator controller not being interactive

* Add back attribution
2023-11-10 12:57:19 +02:00
Stefan Ceriu
5e28627d22 Have the UserIndicatorController use a separate window, switch to using one single instance throughout the application 2023-11-09 16:18:11 +02:00
Doug
45651a368c Fixes the keyboard being shown when opening an Element call link. (#2048) 2023-11-09 08:30:45 +00:00
Doug
b6ba38cb19 Implement AppLockScreen as per the designs. (#1925)
Fix a bug in the unlock flow
2023-10-20 17:35:57 +01:00
Doug
81331aa9b2 Initial setup ready for PIN/Biometric app lock. (#1876)
* Add AppLockCoordinator and WindowManager.
2023-10-11 12:59:47 +00:00