Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
113 commits
Select commit Hold shift + click to select a range
326b37c
WinUI 3 proof of concept
Oliver-Leigh May 25, 2026
164fc78
Added Status Icons
Oliver-Leigh Jun 2, 2026
6838901
Change to procator start for version compatibility
Oliver-Leigh Jun 2, 2026
e67e6e2
Minor fixes and changes
Oliver-Leigh Jun 8, 2026
0fff5f5
Add fonts and refactor gdiplus
Oliver-Leigh Jun 8, 2026
65231a5
Refactor native properties and staged properties
Oliver-Leigh Jun 8, 2026
754ee47
Add minimum window and container sizes
Oliver-Leigh Jun 19, 2026
fdcf9f4
Minor fix to container
Oliver-Leigh Jun 19, 2026
a0a47a1
Refactor GDI+ functions and add get_pixels
Oliver-Leigh Jun 24, 2026
0b6f6ec
Improve Window closing, states and visibility
Oliver-Leigh Jun 24, 2026
8926d50
Fix cursor and window show/hide
Oliver-Leigh Jun 25, 2026
adfcd66
Fix Icon for use with Button
Oliver-Leigh Jun 25, 2026
4dc6825
Fixes to property staging
Oliver-Leigh Jun 26, 2026
9b12c53
More fixes to property staging
Oliver-Leigh Jun 26, 2026
0b348c8
Fixes to font exception types
Oliver-Leigh Jun 26, 2026
d84665c
Fix Icon error handling and add new file formats
Oliver-Leigh Jun 29, 2026
8524c16
Improvements to status icons
Oliver-Leigh Jun 29, 2026
77ebc23
Add reactive proactor
Oliver-Leigh Jul 2, 2026
41ec3e0
Update interop to win32more
Oliver-Leigh Jul 2, 2026
352c5f3
Fix Button icon size and background color
Oliver-Leigh Jul 3, 2026
d8aeddf
Improve native event handling
Oliver-Leigh Jul 8, 2026
204f84b
Add background to Label widget
Oliver-Leigh Jul 8, 2026
a372601
Align Window states with Toga API requirements
Oliver-Leigh Jul 9, 2026
0b6016c
Add WinUI 3 testbed
Oliver-Leigh Jul 9, 2026
2b10166
Add test skips for unimplemented modules
Oliver-Leigh Jul 9, 2026
d1db8c0
Add skips to test_app.py and make menu tests async
Oliver-Leigh Jul 10, 2026
ea4af2e
Add await within app_probe.assert_system_menus()
Oliver-Leigh Jul 10, 2026
fbe9c52
Add base, app and window probes - test_app passing
Oliver-Leigh Jul 10, 2026
fe2a5e5
Improve app probe - test_statusicons passing
Oliver-Leigh Jul 10, 2026
e4a2911
Make StatusIcon activation tests async
Oliver-Leigh Jul 10, 2026
13c953e
test_desktop async changes
Oliver-Leigh Jul 11, 2026
6773cdf
Add lib files for StatusIcon tests
Oliver-Leigh Jul 11, 2026
f24d7cb
Change app and window probe - test_desktop passing
Oliver-Leigh Jul 11, 2026
99bfb27
test_document_app & test_screens skips - passing
Oliver-Leigh Jul 11, 2026
9d819bb
Icon probe & tests async - test_icons passing
Oliver-Leigh Jul 11, 2026
9ecbbe5
Add skips & async close & minimize to test_window
Oliver-Leigh Jul 11, 2026
b1b2f2f
SimpleProbe, FontsMixin & update update test_base
Oliver-Leigh Jul 11, 2026
50af05b
Add button probe
Oliver-Leigh Jul 11, 2026
982e7ba
Add label probe
Oliver-Leigh Jul 11, 2026
7578edc
Box probe & format fixes - all existing tests pass
Oliver-Leigh Jul 12, 2026
0a86ff4
Simplify toml and native application class
Oliver-Leigh Jul 17, 2026
69236de
Make icon tests async
Oliver-Leigh Jul 18, 2026
9f3de59
Simplify color setting code
Oliver-Leigh Jul 18, 2026
404fa9e
Added two cases of pragma: no cover to __init__.py
Oliver-Leigh Jul 18, 2026
6424b4e
StatusIcons: Fix flaky test & add icon change test
Oliver-Leigh Jul 18, 2026
78821c0
Icons: Add test for a bad icon of another type
Oliver-Leigh Jul 18, 2026
e4928f6
StatusIcons: Improve flaky selection tests
Oliver-Leigh Jul 18, 2026
df533e7
Fix menu visibility and re-creation
Oliver-Leigh Jul 22, 2026
05edecb
Remove unnecessary code and add no covers/branches
Oliver-Leigh Jul 22, 2026
c876572
Simplify staged property refreshes
Oliver-Leigh Jul 22, 2026
f4f26ea
Minor changes to BaseProbe and WindowProbe timing
Oliver-Leigh Jul 22, 2026
62c83b6
Fixes to widget input focus
Oliver-Leigh Jul 22, 2026
1717068
Minor changes/fixex to window states and menus
Oliver-Leigh Jul 23, 2026
1fb0cea
Simplify Label widget
Oliver-Leigh Jul 23, 2026
a35c0a2
Improve native event handling
Oliver-Leigh Jul 23, 2026
80559b6
Ensure StatusIcons are closed on app exit
Oliver-Leigh Jul 23, 2026
1b14357
Minor testbed changes for code coverage
Oliver-Leigh Jul 23, 2026
50f6b56
Remove dead code and fix flaky testbed resizing
Oliver-Leigh Jul 24, 2026
5c5a4af
Add native property test
Oliver-Leigh Jul 24, 2026
30b2200
Commenting and minor changes
Oliver-Leigh Jul 27, 2026
27e85c6
Add CI workflow and win32more version pin to toml
Oliver-Leigh Jul 27, 2026
a9001a8
Add change notes
Oliver-Leigh Jul 27, 2026
47e5a24
Merge branch 'main' into winui-3
Oliver-Leigh Jul 27, 2026
fb8a77e
Fixes from merge with 'main'
Oliver-Leigh Jul 27, 2026
2727d87
Changes to CI workflow
Oliver-Leigh Jul 27, 2026
2c28c42
Remove evaluation from CI workflow conditional
Oliver-Leigh Jul 27, 2026
eceb846
Fix native properties test
Oliver-Leigh Jul 27, 2026
e4819b0
Minor fixes to tests
Oliver-Leigh Jul 27, 2026
b45c174
Merge branch 'main' into winui-3
Oliver-Leigh Jul 28, 2026
55c867c
Add handling for native exceptions
Oliver-Leigh Jul 28, 2026
06984a1
Trial changes to widget staging
Oliver-Leigh Jul 28, 2026
12bf420
Use weakref in widget staging
Oliver-Leigh Jul 29, 2026
98b1293
Fix test_cleanup skip for TextInput
Oliver-Leigh Jul 29, 2026
00b456f
Debug - StatusIcon testbed click, I
Oliver-Leigh Jul 29, 2026
9803ccc
Fix to Icon probe __del__ method
Oliver-Leigh Jul 29, 2026
acff47c
Debug - StatusIcon testbed click, II
Oliver-Leigh Jul 29, 2026
9f07186
Debug - ARM64 send input, I
Oliver-Leigh Jul 29, 2026
71efe33
Trial skip for SendInput on ARM64 CI
Oliver-Leigh Jul 29, 2026
737e740
Trial second system tray opening
Oliver-Leigh Jul 29, 2026
0a3c117
Trial longer wait_for_window delay
Oliver-Leigh Jul 29, 2026
eab84a7
Debug - Hide window ARM64, I
Oliver-Leigh Jul 29, 2026
bb62e35
Revert handling for native exceptions
Oliver-Leigh Jul 29, 2026
fd02221
Changes to Window.is_activated
Oliver-Leigh Jul 29, 2026
3b35147
Revert debug changes and add comments
Oliver-Leigh Jul 29, 2026
5060a47
Revert changes to Window.is_activated
Oliver-Leigh Jul 29, 2026
41a16b9
Trial wait_for_window with is_activated argument
Oliver-Leigh Jul 29, 2026
66fbfc7
Revert wait_for_window and add ARM64 CI skip
Oliver-Leigh Jul 29, 2026
105e395
Allow incomplete coverage on ARM64 CI
Oliver-Leigh Jul 29, 2026
5dd8b60
Trial native error testbed debug
Oliver-Leigh Jul 30, 2026
305f818
Trial using windows-11-vs2026-arm for CI
Oliver-Leigh Aug 3, 2026
1fc4a84
Fix formatting
Oliver-Leigh Aug 3, 2026
54cc3c7
Merge branch 'main' into winui-3
Oliver-Leigh Aug 3, 2026
734db78
Ruff 0.16.0 fixes
Oliver-Leigh Aug 3, 2026
b9e9cbc
Revert "Trial using windows-11-vs2026-arm for CI"
Oliver-Leigh Aug 3, 2026
fdd4097
Improve DPI handling
Oliver-Leigh Aug 3, 2026
002a18e
Minor changes to tests
Oliver-Leigh Aug 3, 2026
912819c
Minor fixes and changes from review
Oliver-Leigh Aug 3, 2026
6c298c5
Consolidate test skips into module level skips
Oliver-Leigh Aug 5, 2026
2c2367e
Property staging revamp and other minor changes
Oliver-Leigh Aug 5, 2026
98cb359
Improve the testing of property staging
Oliver-Leigh Aug 5, 2026
816112b
Improve backend for `test_menu_visit_homepage`
Oliver-Leigh Aug 5, 2026
d36dff8
Improve backend for `test_menu_visit_homepage`, II
Oliver-Leigh Aug 6, 2026
9889c93
Improve menu item selection on testbed backend
Oliver-Leigh Aug 6, 2026
8c25963
Debug testbed instability, I
Oliver-Leigh Aug 6, 2026
961684d
Debug testbed instability, II
Oliver-Leigh Aug 6, 2026
92eb3fb
Debug testbed instability, III
Oliver-Leigh Aug 6, 2026
4133186
Use while loops over for loops when test waiting
Oliver-Leigh Aug 7, 2026
bc09a33
Fixes to window state changes
Oliver-Leigh Aug 8, 2026
fa0adc1
Minor updates to loop and fixes to loop shutdown
Oliver-Leigh Aug 11, 2026
06241ab
Fix to window min_size for DPI changes
Oliver-Leigh Aug 12, 2026
2748010
Add DPI change test
Oliver-Leigh Aug 12, 2026
fec9e1c
Fix DPI test
Oliver-Leigh Aug 13, 2026
fb13e2c
Reduce DPI test window size to fit CI runner
Oliver-Leigh Aug 13, 2026
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
35 changes: 34 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,8 @@ jobs:
- "windows-netfx-x86_64"
- "windows-netcore-x86_64"
- "windows-netcore-arm64"
- "windows-winui3-x86_64"
- "windows-winui3-arm64"
- "linux-x11-gtk3"
- "linux-wayland-gtk3"
- "linux-wayland-gtk4"
Expand Down Expand Up @@ -519,6 +521,32 @@ jobs:
runs-on: "windows-11-arm"
app-user-data-path: '$HOME\AppData\Local\Tiberius Yak\Toga Testbed\Data'

- backend: "windows-winui3-x86_64"
platform: "windows"
runs-on: "windows-latest"
testbed-app: "testbed-winui3"
app-user-data-path: '$HOME\AppData\Local\Tiberius Yak\Toga Testbed (WinUI 3)\Data'
pre-command-pwsh: |
Invoke-WebRequest `
-Uri "https://aka.ms/windowsappsdk/2.3/2.3.1/windowsappruntimeinstall-x64.exe" `
-OutFile "windows_app_sdk_installer.exe"
Start-Process `
-FilePath ".\windows_app_sdk_installer.exe" `
-Wait

- backend: "windows-winui3-arm64"
platform: "windows"
runs-on: "windows-11-arm"
testbed-app: "testbed-winui3"
app-user-data-path: '$HOME\AppData\Local\Tiberius Yak\Toga Testbed (WinUI 3)\Data'
pre-command-pwsh: |
Invoke-WebRequest `
-Uri "https://aka.ms/windowsappsdk/2.3/2.3.1/windowsappruntimeinstall-arm64.exe" `
-OutFile "windows_app_sdk_installer.exe"
Start-Process `
-FilePath ".\windows_app_sdk_installer.exe" `
-Wait

- backend: "iOS"
platform: "iOS"
runs-on: "macos-15"
Expand Down Expand Up @@ -561,7 +589,12 @@ jobs:
with:
python-version: "3.12"

- name: Install Dependencies
- name: Install Dependencies (pwsh)
if: matrix.platform == 'windows'
shell: pwsh
run: ${{ matrix.pre-command-pwsh }}

- name: Install Dependencies (bash)
env:
PIP_BREAK_SYSTEM_PACKAGES: "1"
run: |
Expand Down
14 changes: 7 additions & 7 deletions android/tests_backend/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ async def close_about_dialog(self):
assert about_dialog is not None, "No about dialog displayed"
await self.press_dialog_button(about_dialog, "OK")

def activate_menu_visit_homepage(self):
async def activate_menu_visit_homepage(self):
pytest.xfail("This backend doesn't have a visit homepage command")

def assert_menu_item(self, path, *, enabled=True):
async def assert_menu_item(self, path, *, enabled=True):
assert self._menu_item(path).isEnabled() == enabled

def assert_menu_order(self, path, expected):
async def assert_menu_order(self, path, expected):
item = self._menu_item(path)
menu = item.getSubMenu()

Expand All @@ -105,8 +105,8 @@ def assert_menu_order(self, path, expected):
else:
assert menu.getItem(i - separator_offset).getTitle() == title

def assert_system_menus(self):
self.assert_menu_item(["About Toga Testbed"])
async def assert_system_menus(self):
await self.assert_menu_item(["About Toga Testbed"])

def activate_menu_close_window(self):
pytest.xfail("This backend doesn't have a window management menu")
Expand Down Expand Up @@ -140,10 +140,10 @@ def has_status_icon(self, status_icon):
def status_menu_items(self, status_icon):
pytest.xfail("Status icons not implemented on Android")

def activate_status_icon_button(self, item_id):
async def activate_status_icon_button(self, item_id):
pytest.xfail("Status icons not implemented on Android")

def activate_status_menu_item(self, item_id, title):
async def activate_status_menu_item(self, item_id, title):
pytest.xfail("Status icons not implemented on Android")

async def assert_event_loop(self):
Expand Down
7 changes: 4 additions & 3 deletions android/tests_backend/icons.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@
class IconProbe(BaseProbe):
# Android only supports 1 format, so the alternate is the same as the primary.
alternate_resource = "resources/icons/blue"
alternate_bad = "resources/icons/bad_png"

def __init__(self, app, icon):
super().__init__(app)
self.icon = icon
assert isinstance(self.icon._impl.native, Bitmap)

def assert_icon_content(self, path):
async def assert_icon_content(self, path):
if path == "resources/icons/green":
assert (
self.icon._impl.path == self.app.paths.app / "resources/icons/green.png"
Expand All @@ -29,13 +30,13 @@ def assert_icon_content(self, path):
else:
pytest.fail("Unknown icon resource")

def assert_default_icon_content(self):
async def assert_default_icon_content(self):
assert (
self.icon._impl.path
== Path(toga_android.__file__).parent / "resources/toga.png"
)

def assert_platform_icon_content(self):
async def assert_platform_icon_content(self):
assert self.icon._impl.path == self.app.paths.app / "resources/logo-android.png"

def assert_app_icon_content(self):
Expand Down
3 changes: 3 additions & 0 deletions android/tests_backend/widgets/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,9 @@ async def undo(self):
async def redo(self):
pytest.skip("Redo not supported on this platform")

async def assert_backend_specific_properties(self):
pytest.skip("Test not implemented for this platform")


def find_view_by_type(root, cls):
assert isinstance(root, View)
Expand Down
6 changes: 1 addition & 5 deletions android/tests_backend/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,7 @@ def __init__(self, app, window):
self.window = window
self.impl = self.window._impl

async def wait_for_window(
self,
message,
state=None,
):
async def wait_for_window(self, message, state=None):
await self.redraw(message, delay=0.1)
if state:
timeout = 5
Expand Down
1 change: 1 addition & 0 deletions changes/2574.feature.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Toga now provides a WinUI 3 backend for Windows desktops.
1 change: 1 addition & 0 deletions changes/2574.feature.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The Toga WinUI 3 backend for Windows desktops now implements StatusIcons.
1 change: 1 addition & 0 deletions changes/2574.feature.3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The Toga WinUI 3 backend for Windows desktops now implements the Box widget.
1 change: 1 addition & 0 deletions changes/2574.feature.4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The Toga WinUI 3 backend for Windows desktops now implements the Button widget.
1 change: 1 addition & 0 deletions changes/2574.feature.5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The Toga WinUI 3 backend for Windows desktops now implements the Label widget.
68 changes: 34 additions & 34 deletions cocoa/tests_backend/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def activate_menu_hide(self):
argtypes=[objc_id],
)

def activate_menu_exit(self):
async def activate_menu_exit(self):
self._activate_menu_item(["*", "Quit Toga Testbed"])

def activate_menu_about(self):
Expand All @@ -161,37 +161,37 @@ async def close_about_dialog(self):
if isinstance(about_dialog, NSPanel):
about_dialog.close()

def activate_menu_visit_homepage(self):
async def activate_menu_visit_homepage(self):
self._activate_menu_item(["Help", "Visit homepage"])

def assert_system_menus(self):
self.assert_menu_item(["*", "About Toga Testbed"], enabled=True)
self.assert_menu_item(["*", "Hide Toga Testbed"], enabled=True)
self.assert_menu_item(["*", "Hide Others"], enabled=True)
self.assert_menu_item(["*", "Show All"], enabled=True)
self.assert_menu_item(["*", "Quit Toga Testbed"], enabled=True)

self.assert_menu_item(["File", "New Example Document"], enabled=True)
self.assert_menu_item(["File", "New Read-only Document"], enabled=True)
self.assert_menu_item(["File", "Open\u2026"], enabled=True)
self.assert_menu_item(["File", "Save"], enabled=True)
self.assert_menu_item(["File", "Save As\u2026"], enabled=True)
self.assert_menu_item(["File", "Save All"], enabled=True)
self.assert_menu_item(["File", "Close"], enabled=True)
self.assert_menu_item(["File", "Close All"], enabled=True)

self.assert_menu_item(["Edit", "Undo"], enabled=True)
self.assert_menu_item(["Edit", "Redo"], enabled=True)
self.assert_menu_item(["Edit", "Cut"], enabled=True)
self.assert_menu_item(["Edit", "Copy"], enabled=True)
self.assert_menu_item(["Edit", "Paste"], enabled=True)
self.assert_menu_item(["Edit", "Paste and Match Style"], enabled=True)
self.assert_menu_item(["Edit", "Delete"], enabled=True)
self.assert_menu_item(["Edit", "Select All"], enabled=True)

self.assert_menu_item(["Window", "Minimize"], enabled=True)

self.assert_menu_item(["Help", "Visit homepage"], enabled=True)
async def assert_system_menus(self):
await self.assert_menu_item(["*", "About Toga Testbed"], enabled=True)
await self.assert_menu_item(["*", "Hide Toga Testbed"], enabled=True)
await self.assert_menu_item(["*", "Hide Others"], enabled=True)
await self.assert_menu_item(["*", "Show All"], enabled=True)
await self.assert_menu_item(["*", "Quit Toga Testbed"], enabled=True)

await self.assert_menu_item(["File", "New Example Document"], enabled=True)
await self.assert_menu_item(["File", "New Read-only Document"], enabled=True)
await self.assert_menu_item(["File", "Open\u2026"], enabled=True)
await self.assert_menu_item(["File", "Save"], enabled=True)
await self.assert_menu_item(["File", "Save As\u2026"], enabled=True)
await self.assert_menu_item(["File", "Save All"], enabled=True)
await self.assert_menu_item(["File", "Close"], enabled=True)
await self.assert_menu_item(["File", "Close All"], enabled=True)

await self.assert_menu_item(["Edit", "Undo"], enabled=True)
await self.assert_menu_item(["Edit", "Redo"], enabled=True)
await self.assert_menu_item(["Edit", "Cut"], enabled=True)
await self.assert_menu_item(["Edit", "Copy"], enabled=True)
await self.assert_menu_item(["Edit", "Paste"], enabled=True)
await self.assert_menu_item(["Edit", "Paste and Match Style"], enabled=True)
await self.assert_menu_item(["Edit", "Delete"], enabled=True)
await self.assert_menu_item(["Edit", "Select All"], enabled=True)

await self.assert_menu_item(["Window", "Minimize"], enabled=True)

await self.assert_menu_item(["Help", "Visit homepage"], enabled=True)

def _activate_menu_window_item(self, path):
item = self._menu_item(path)
Expand Down Expand Up @@ -223,11 +223,11 @@ def assert_dialog_in_focus(self, dialog):
"The dialog is not in focus"
)

def assert_menu_item(self, path, enabled):
async def assert_menu_item(self, path, enabled):
item = self._menu_item(path)
assert item.isEnabled() == enabled

def assert_menu_order(self, path, expected):
async def assert_menu_order(self, path, expected):
menu = self._menu_item(path).submenu

assert menu.numberOfItems == len(expected)
Expand Down Expand Up @@ -333,10 +333,10 @@ def status_menu_items(self, status_icon):
# It's a button status item
return None

def activate_status_icon_button(self, item_id):
async def activate_status_icon_button(self, item_id):
self.app.status_icons[item_id]._impl.native.button.performClick(None)

def activate_status_menu_item(self, item_id, title):
async def activate_status_menu_item(self, item_id, title):
item = self.app.status_icons[item_id]._impl.native.menu.itemWithTitle(title)
send_message(
self.app._impl.native.delegate,
Expand Down
7 changes: 4 additions & 3 deletions cocoa/tests_backend/icons.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@

class IconProbe(BaseProbe):
alternate_resource = "resources/icons/blue"
alternate_bad = "resources/icons/bad_png"

def __init__(self, app, icon):
super().__init__()
self.app = app
self.icon = icon
assert isinstance(self.icon._impl.native, NSImage)

def assert_icon_content(self, path):
async def assert_icon_content(self, path):
match path:
case "resources/icons/green":
assert (
Expand All @@ -34,13 +35,13 @@ def assert_icon_content(self, path):
case _:
pytest.fail("Unknown icon resource")

def assert_default_icon_content(self):
async def assert_default_icon_content(self):
assert (
self.icon._impl.path
== Path(toga_cocoa.__file__).parent / "resources/toga.icns"
)

def assert_platform_icon_content(self):
async def assert_platform_icon_content(self):
assert self.icon._impl.path == self.app.paths.app / "resources/logo-macOS.icns"

def assert_app_icon_content(self):
Expand Down
4 changes: 4 additions & 0 deletions cocoa/tests_backend/widgets/base.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from pytest import skip
from rubicon.objc import NSPoint

from toga.colors import TRANSPARENT
Expand Down Expand Up @@ -224,3 +225,6 @@ async def undo(self):

async def redo(self):
await self.type_character("z", alt=True, shift=True)

async def assert_backend_specific_properties(self):
skip("Test not implemented for this platform")
14 changes: 7 additions & 7 deletions cocoa/tests_backend/window.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import asyncio

import pytest
from rubicon.objc import objc_id, send_message

from toga.constants import WindowState
Expand Down Expand Up @@ -29,11 +30,7 @@ def __init__(self, app, window):
self.native = window._impl.native
assert isinstance(self.native, NSWindow)

async def wait_for_window(
self,
message,
state=None,
):
async def wait_for_window(self, message, state=None):
await self.redraw(message, delay=0.1)

if state:
Expand Down Expand Up @@ -87,7 +84,7 @@ async def cleanup(self):
delay = 0.1
await self.redraw("Closing window", delay=delay)

def close(self):
async def close(self):
self.native.performClose(None)

@property
Expand All @@ -113,7 +110,7 @@ def is_minimizable(self):
def is_minimized(self):
return bool(self.native.isMiniaturized)

def minimize(self):
async def minimize(self):
self.native.performMiniaturize(None)

def unminimize(self):
Expand Down Expand Up @@ -176,3 +173,6 @@ def automated_show(host_window, future):
def _setup_file_dialog_result(self, dialog, result):
# Closing a window modal file dialog is the same as alerts.
self._setup_alert_dialog_result(dialog, result)

async def assert_system_dpi_change(self, get_probe, mock_scale):
pytest.skip("Test not implemented for this platform")
Loading