Skip to content

Commit

Permalink
[MWB] Changed to suppress the flow of the execution context
Browse files Browse the repository at this point in the history
  • Loading branch information
YDKK committed Jan 15, 2025
1 parent 315059f commit 5639d15
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/modules/MouseWithoutBorders/App/Class/Common.Helper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using System.IO;
using System.Linq;
using System.Security.Principal;
using System.Threading;
using System.Windows.Forms;

// <summary>
Expand Down Expand Up @@ -72,6 +73,8 @@ private static void WatchDogThread()

private static void HelperThread()
{
ExecutionContext.SuppressFlow();

try
{
while (true)
Expand Down
2 changes: 2 additions & 0 deletions src/modules/MouseWithoutBorders/App/Class/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,8 @@ internal static void StartInputCallbackThread()

private static void InputCallbackThread()
{
ExecutionContext.SuppressFlow();

Common.InputCallbackThreadID = Thread.CurrentThread.ManagedThreadId;
while (!Common.InitDone)
{
Expand Down
4 changes: 4 additions & 0 deletions src/modules/MouseWithoutBorders/App/Class/SocketStuff.cs
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,8 @@ internal int TcpSend(TcpSk tcp, DATA data)

private void TCPServerThread(object param)
{
ExecutionContext.SuppressFlow();

try
{
TcpListener server = param as TcpListener;
Expand Down Expand Up @@ -1547,6 +1549,8 @@ private void MainTCPRoutine(TcpSk tcp, string machineName, bool isClient)

private static void AcceptConnectionAndSendClipboardData(object param)
{
ExecutionContext.SuppressFlow();

TcpListener server = param as TcpListener;

do
Expand Down

0 comments on commit 5639d15

Please sign in to comment.