* Fix Metal renderer memory leakage on macOS
* Remove no-op ResetContext call
* Disposable wrapper
* Success flag in ctor to dispose
* Rename variable name to _autoReleasePool
* Abstraction over AutoReleasePool
* Use Interlocked.Exchange in AutoReleasePool
---------
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
* Fix#20816: OneWay binding fails to update target after local change
When a OneWay binding target is modified locally (e.g., via user
interaction on a ToggleButton), subsequent PropertyChanged events from
the source were being ignored. This occurred because the binding
expression incorrectly suppressed the update.
This patch modifies UntypedBindingExpressionBase to ensure that OneWay
bindings always propagate changes from the source to the target,
overriding any previous local changes. Unit tests were also added to
prevent future regressions on this behavior.
Signed-off-by: Martim Claudino <martimffclaudino@tecnico.ulisboa.pt>
* fix: scope forceUpdate to OneWay mode, use SetCurrentValue in tests and clean usings
Signed-off-by: Martim Claudino <martimffclaudino@tecnico.ulisboa.pt>
---------
Signed-off-by: Martim Claudino <martimffclaudino@tecnico.ulisboa.pt>
* Win32: fix None/BorderOnly maximized position on secondary screens
* Fix WindowCustomizationsPage
* Use correct screen when minimized
* Fallback to nearest monitor
* Announce changes to live regions on macOS
It is necessary to manually request announcement of the new name of a live
region, alongside posting the general kAXLiveRegionChangedNotification.
* Refactor -raisePropertyChanged: to use switch statement
* Fix warning about switch not covering all cases
---------
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
* fix: focus correct date selector for day-first locales in DatePickerPresenter
SetInitialFocus had a copy-paste bug where the day-first branch
focused _monthSelector instead of _daySelector. This caused every
locale that puts day first (UK, Europe, Australia, India — dd/MM/yyyy)
to focus the wrong selector when the picker opened.
Refactored the three near-identical if/else branches into a
data-driven loop that pairs each host panel with its selector,
making this class of copy-paste bug structurally impossible.
* chore: retrigger CI
* chore: retrigger CI
---------
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
* fix: check format key in DataTransferItem.FindAccessor single-item path
The single-item fast path in FindAccessor returned the stored value for
any format query without checking if the requested format matched.
This caused TryGetRaw to return wrong data when queried with a format
different from the one stored (e.g., querying Bitmap on a text-only item
returned the text value instead of null).
Add the missing singleItem.Key.Equals(format) check, consistent with
the dictionary path (TryGetValue) and RemoveCore.
* chore: retrigger CI
* chore: retrigger CI
---------
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
* fix: correct null check variable in TryResolveFileReferenceUri on macOS
The null check on line 401 tested `fileUri` instead of `filePathUri`,
making it dead code since `fileUri` was already checked on line 394.
When `[fileUri filePathURL]` returned nil (non-file URL or unreachable
resource), the nil `filePathUri` was passed to `[filePathUri absoluteString]`
and then to `CreateAvnString`, causing a native crash.
* fix: initialize NSError to nil in SaveBookmarkToBytes on macOS
NSError* was declared without initialization, containing stack garbage.
On the success path (bookmarkData non-nil), Cocoa does not guarantee
zeroing the error out-parameter, so the subsequent `if (error != nil)`
check could read garbage and incorrectly call CreateAvnString with a
garbage pointer.
Initialize to nil and restructure to `else if` so the error is only
inspected when bookmarkData is nil (the failure path).
* chore: retrigger CI
* fix: guard out-parameters in SaveBookmarkToBytes
Initialize *ppv to nullptr on entry so callers never read garbage on
the nil-fileUri / nil-bookmarkData paths. Guard *err write with a
nullptr check for callers that pass no error out-parameter.
* chore: retrigger CI
---------
Co-authored-by: Julien Lebosquain <julien@lebosquain.net>
* test: add DataFormat.CreateInProcessFormat tests
Cover the new InProcess format API: kind, identifier, null/empty
validation, non-ASCII identifiers, HasSystemName for all four kinds,
ToSystemName throwing, equality/inequality, DataTransferItem
integration, and coexistence with other formats in DataTransfer.
* feat: implement DataFormat.CreateInProcessFormat<T> for in-process drag/drop
Add DataFormatKind.InProcess and DataFormat.CreateInProcessFormat<T>()
so users can pass arbitrary object references during in-process
drag-and-drop without crossing serialization boundaries.
- Add HasSystemName property to indicate whether ToSystemName() is valid
- Update ToSystemName to throw for InProcess (same as Universal)
- Guard all 7 platform backends (Win32, macOS, X11, Android, Browser,
iOS) to skip InProcess formats during clipboard/drag-drop enumeration
Closes#20097
* fix: remove HasSystemName API per review feedback
* replace hamburger view with drawer page. use ContentPage in control catalog
* Added Icons
* fix listbox and carousel page
* make MainView drawer page
* add PageNavigationHost to control catalog
---------
Co-authored-by: Javier Suárez Ruiz <javiersuarezruiz@hotmail.com>
* test: add regression test for access key with system key events
Regression test for #20961: verifies that access keys fire correctly
when triggered via Alt+key (system key events).
* fix: provide KeySymbol for system key events via MapVirtualKey
On Windows, WM_SYSKEYDOWN (Alt+key) intentionally skips ToUnicodeEx
to avoid corrupting keyboard state. This left KeySymbol null, which
broke access keys after #20662 switched from Key to KeySymbol.
Use MapVirtualKey(VK, MAPVK_VK_TO_CHAR) as a layout-aware fallback
for system key events — it resolves the character without touching
keyboard state.
Fixes#20961
* chore: retrigger CI
* Fix ATSPI SyncContext to UIThread
* Update Avalonia.DBus submodule to fix empty array serialization and error handling
* use public api and revert to instantiation.
* wip touch improvement textbox
* update text selection handle style
* change text selector layer z-index
* fix build issues
* fix caret detection in touch mode
* added bottom padding to text handle
* add indicator visual to selection handler theme
* improve text selector indicator handling
* add support for wrap around in selection handles
* ensure textbox context menu is shown on hold
* dampen scroll inertia
* increase default tap and double tap sizes for touch and pen
* make textbox context menu horizontal in touch mode. improve context menu show behavior for selection handles
* detect overscroll in scroll presenter and handle scroll gesture if overscrolled
* add rtl detection for selection handles
* improve context flyout behavior in handles
* restore textbox page
* addressed review
* add touch tests textbox
* keep dragged handle visible, adjust flyout position to visible handle
* Bump MicroCOM to 0.11.4, add workaround for WinRT bug
* menu.h - use ComPtr for COM stored references
* Replaced raw COM pointers with smart ones
* fixes
* Use weak com ref from AvnMenuItem
* Better smart pointer handling
* Avalonia native readme update
* review
* missing dif
* Just call the ctor like a normal person
* Expose WM window action capabilities from X11.
* Hide titlebar buttons for unsupported actions
* Simplify subscription
* Explose NetSupported property from X11Globals.cs, so it's easier to make checks from the rest of the codebase
* shifts
* comma