Skip to content

Commit 5639d15

Browse files
committed
[MWB] Changed to suppress the flow of the execution context
1 parent 315059f commit 5639d15

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

src/modules/MouseWithoutBorders/App/Class/Common.Helper.cs

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
using System.IO;
1111
using System.Linq;
1212
using System.Security.Principal;
13+
using System.Threading;
1314
using System.Windows.Forms;
1415

1516
// <summary>
@@ -72,6 +73,8 @@ private static void WatchDogThread()
7273

7374
private static void HelperThread()
7475
{
76+
ExecutionContext.SuppressFlow();
77+
7578
try
7679
{
7780
while (true)

src/modules/MouseWithoutBorders/App/Class/Program.cs

+2
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,8 @@ internal static void StartInputCallbackThread()
378378

379379
private static void InputCallbackThread()
380380
{
381+
ExecutionContext.SuppressFlow();
382+
381383
Common.InputCallbackThreadID = Thread.CurrentThread.ManagedThreadId;
382384
while (!Common.InitDone)
383385
{

src/modules/MouseWithoutBorders/App/Class/SocketStuff.cs

+4
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,8 @@ internal int TcpSend(TcpSk tcp, DATA data)
679679

680680
private void TCPServerThread(object param)
681681
{
682+
ExecutionContext.SuppressFlow();
683+
682684
try
683685
{
684686
TcpListener server = param as TcpListener;
@@ -1547,6 +1549,8 @@ private void MainTCPRoutine(TcpSk tcp, string machineName, bool isClient)
15471549

15481550
private static void AcceptConnectionAndSendClipboardData(object param)
15491551
{
1552+
ExecutionContext.SuppressFlow();
1553+
15501554
TcpListener server = param as TcpListener;
15511555

15521556
do

0 commit comments

Comments
 (0)