From e3ee07a4dd967953f6d65444708fb23812ed02de Mon Sep 17 00:00:00 2001 From: mikoto2000 Date: Fri, 8 Nov 2024 20:52:49 +0900 Subject: [PATCH] Added get pixel size process. --- src/wslbridge2-backend.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) mode change 100644 => 100755 src/wslbridge2-backend.cpp diff --git a/src/wslbridge2-backend.cpp b/src/wslbridge2-backend.cpp old mode 100644 new mode 100755 index d04093f..e3b3ad2 --- a/src/wslbridge2-backend.cpp +++ b/src/wslbridge2-backend.cpp @@ -256,9 +256,9 @@ int main(int argc, char *argv[]) s++; len--; // ensure 8 more bytes are loaded for winsize - while (readRet > 0 && len < 8) + while (readRet > 0 && len < 16) { - readRet = recv(ioSockets.inputSock, s + len, 8 - len, 0); + readRet = recv(ioSockets.inputSock, s + len, 16 - len, 0); if (readRet > 0) { len += readRet; @@ -272,8 +272,6 @@ int main(int argc, char *argv[]) struct winsize * winsp = (struct winsize *)s; s += 8; len -= 8; - winsp->ws_xpixel = 0; - winsp->ws_ypixel = 0; ret = ioctl(mfd, TIOCSWINSZ, winsp); if (ret != 0) perror("ioctl(TIOCSWINSZ)"); @@ -299,8 +297,6 @@ int main(int argc, char *argv[]) assert(ret > 0); /* Remove "unused" pixel values ioctl_tty(2) */ - winp.ws_xpixel = 0; - winp.ws_ypixel = 0; ret = ioctl(mfd, TIOCSWINSZ, &winp); if (ret != 0) perror("ioctl(TIOCSWINSZ)");