Skip to content

Commit e3ee07a

Browse files
mikoto2000Biswa96
authored andcommitted
Added get pixel size process.
1 parent 5f444e6 commit e3ee07a

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/wslbridge2-backend.cpp

100644100755
Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,9 @@ int main(int argc, char *argv[])
256256
s++;
257257
len--;
258258
// ensure 8 more bytes are loaded for winsize
259-
while (readRet > 0 && len < 8)
259+
while (readRet > 0 && len < 16)
260260
{
261-
readRet = recv(ioSockets.inputSock, s + len, 8 - len, 0);
261+
readRet = recv(ioSockets.inputSock, s + len, 16 - len, 0);
262262
if (readRet > 0)
263263
{
264264
len += readRet;
@@ -272,8 +272,6 @@ int main(int argc, char *argv[])
272272
struct winsize * winsp = (struct winsize *)s;
273273
s += 8;
274274
len -= 8;
275-
winsp->ws_xpixel = 0;
276-
winsp->ws_ypixel = 0;
277275
ret = ioctl(mfd, TIOCSWINSZ, winsp);
278276
if (ret != 0)
279277
perror("ioctl(TIOCSWINSZ)");
@@ -299,8 +297,6 @@ int main(int argc, char *argv[])
299297
assert(ret > 0);
300298

301299
/* Remove "unused" pixel values ioctl_tty(2) */
302-
winp.ws_xpixel = 0;
303-
winp.ws_ypixel = 0;
304300
ret = ioctl(mfd, TIOCSWINSZ, &winp);
305301
if (ret != 0)
306302
perror("ioctl(TIOCSWINSZ)");

0 commit comments

Comments
 (0)