-
Notifications
You must be signed in to change notification settings - Fork 760
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(winui): implemented Window::DispatcherQueue
- Loading branch information
Showing
1 changed file
with
4 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,10 @@ public sealed partial class Window | |
|
||
private List<WeakEventHelper.GenericEventHandler> _sizeChangedHandlers = new List<WeakEventHelper.GenericEventHandler>(); | ||
|
||
#if HAS_UNO_WINUI | ||
public global::Microsoft.UI.Dispatching.DispatcherQueue DispatcherQueue { get; } = global::Microsoft.UI.Dispatching.DispatcherQueue.GetForCurrentThread(); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
jeromelaban
Member
|
||
#endif | ||
|
||
#pragma warning disable 67 | ||
/// <summary> | ||
/// Occurs when the window has successfully been activated. | ||
|
@Xiaoy312 can we confirm with @jeromelaban that GetForCurrenThread will return a value when accessed from a background thread. I know that when running on WinUI this method typically returns null when requested from a non-UI thread