fixed bug: deadlock when resizing PTY window

This commit is contained in:
Christian Burger 2022-04-29 16:36:07 +02:00
parent 78672521c4
commit 02266dfb0c

View file

@ -258,7 +258,7 @@ namespace krikkel::NCursesPtyWindow
/// resizing?
int PtyWindow::wresize(int rows, int cols)
{
lock_guard nCursesLock(*writeToNCursesMutex);
{
lock_guard writeLock(writeToPseudoTerminalMutex);
winsize windowSize =
{
@ -267,9 +267,12 @@ namespace krikkel::NCursesPtyWindow
};
ioctl(fdPtyHost, TIOCSWINSZ, &windowSize);
vterm_set_size(pseudoTerminal, rows, cols);
}
{
lock_guard nCursesLock(*writeToNCursesMutex);
return NCursesWindow::wresize(rows, cols);
}
}
int PtyWindow::staticHandlerDamage(VTermRect rect, void *user)
{