Skip to content

Commit

Permalink
Fixes gui-cs#1683. The application freezes while resizing the termina…
Browse files Browse the repository at this point in the history
…l on MacOS
  • Loading branch information
BDisp committed May 23, 2023
1 parent f5ca5b0 commit 4e46069
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Terminal.Gui/ConsoleDrivers/CursesDriver/UnixMainLoop.cs
Expand Up @@ -82,6 +82,7 @@ class Watch {
bool poll_dirty = true;
int [] wakeupPipes = new int [2];
static IntPtr ignore = Marshal.AllocHGlobal (1);
static IntPtr readHandle = Marshal.AllocHGlobal (1);
MainLoop mainLoop;
bool winChanged;

Expand All @@ -97,7 +98,7 @@ void IMainLoopDriver.Setup (MainLoop mainLoop)
this.mainLoop = mainLoop;
pipe (wakeupPipes);
AddWatch (wakeupPipes [0], Condition.PollIn, ml => {
read (wakeupPipes [0], ignore, (IntPtr)1);
var result = read (wakeupPipes [0], ignore, readHandle);
return true;
});
}
Expand Down

0 comments on commit 4e46069

Please sign in to comment.