Skip to content

Commit 22cf4e3

Browse files
authored
V1 macos freeze fix 1683 (#2668)
* Fixes #1683. The application freezes while resizing the terminal on MacOS * Remove unused variable.
1 parent f5ca5b0 commit 22cf4e3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Terminal.Gui/ConsoleDrivers/CursesDriver/UnixMainLoop.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ class Watch {
8282
bool poll_dirty = true;
8383
int [] wakeupPipes = new int [2];
8484
static IntPtr ignore = Marshal.AllocHGlobal (1);
85+
static IntPtr readHandle = Marshal.AllocHGlobal (1);
8586
MainLoop mainLoop;
8687
bool winChanged;
8788

@@ -97,7 +98,7 @@ void IMainLoopDriver.Setup (MainLoop mainLoop)
9798
this.mainLoop = mainLoop;
9899
pipe (wakeupPipes);
99100
AddWatch (wakeupPipes [0], Condition.PollIn, ml => {
100-
read (wakeupPipes [0], ignore, (IntPtr)1);
101+
read (wakeupPipes [0], ignore, readHandle);
101102
return true;
102103
});
103104
}

0 commit comments

Comments
 (0)