Skip to content

Commit

Permalink
chore: Thread.CurrentThread.ManagedThreadId -> Environment.CurrentMan…
Browse files Browse the repository at this point in the history
…agedThreadId
  • Loading branch information
ramezgerges committed Oct 9, 2023
1 parent 8894ed7 commit 2e4131e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
3 changes: 1 addition & 2 deletions src/Uno.UI.Runtime.Skia.Gtk/Input/GtkKeyboardInputSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using Gdk;
using Gtk;
using Windows.System;
Expand Down Expand Up @@ -129,7 +128,7 @@ private static string WindowsKeyCodeToUnicode(uint keyCode)
}

var scanCode = MapVirtualKey(keyCode, 0);
var inputLocaleIdentifier = GetKeyboardLayout((uint)Thread.CurrentThread.ManagedThreadId);
var inputLocaleIdentifier = GetKeyboardLayout((uint)Environment.CurrentManagedThreadId);

var result = new StringBuilder();
ToUnicodeEx(keyCode, scanCode, keyboardState, result, (int)5, (uint)0, inputLocaleIdentifier);
Expand Down
3 changes: 1 addition & 2 deletions src/Uno.UI.Runtime.Skia.Wpf/Input/WpfKeyboardInputSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using System;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading;
using Uno.Foundation.Logging;
using Windows.Foundation;
using Windows.System;
Expand Down Expand Up @@ -116,7 +115,7 @@ private static string WindowsKeyCodeToUnicode(uint keyCode)
}

var scanCode = MapVirtualKey(keyCode, 0);
var inputLocaleIdentifier = GetKeyboardLayout((uint)Thread.CurrentThread.ManagedThreadId);
var inputLocaleIdentifier = GetKeyboardLayout((uint)Environment.CurrentManagedThreadId);

var result = new StringBuilder();
ToUnicodeEx(keyCode, scanCode, keyboardState, result, (int)5, (uint)0, inputLocaleIdentifier);
Expand Down
6 changes: 2 additions & 4 deletions src/Uno.UI/UI/Xaml/Documents/InlineCollection.skia.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SkiaSharp;
using Windows.Foundation;
using Windows.UI.Composition;
Expand All @@ -28,7 +26,7 @@ partial class InlineCollection

// these should only be used by TextBox.
internal (int startLine, int startIndex, int endLine, int endIndex)? Selection { get; set; }
internal (bool atEndOfSelection, Color color)? Caret { get; set; }
internal (bool atEndOfSelection, Windows.UI.Color color)? Caret { get; set; }
internal bool RenderSelectionAndCaret { get; set; }

/// <summary>
Expand Down

0 comments on commit 2e4131e

Please sign in to comment.