Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can wslbridge2 return ws_xpixel and ws_ypixel? #44

Closed
mikoto2000 opened this issue Nov 2, 2024 · 9 comments
Closed

Can wslbridge2 return ws_xpixel and ws_ypixel? #44

mikoto2000 opened this issue Nov 2, 2024 · 9 comments

Comments

@mikoto2000
Copy link
Contributor

mikoto2000 commented Nov 2, 2024

The following sections set zero, but some terminals should be able to retrieve pixel-level size.

winsp->ws_xpixel = 0;
winsp->ws_ypixel = 0;

/* Remove "unused" pixel values ioctl_tty(2) */
winp.ws_xpixel = 0;
winp.ws_ypixel = 0;

Is it possible to set these ws_xpixel and ws_ypixel and return them to the app?

@Biswa96
Copy link
Owner

Biswa96 commented Nov 2, 2024

I am not sure. @mintty may help with terminal related topics.

@mintty
Copy link
Contributor

mintty commented Nov 2, 2024

Mintty provides these values when sending SIGWINCH. I think wslbridge could propagate them along with the cell size, where handling struct winsize. I may find some time occasionally to check but it's a change in wslbridge.

@mikoto2000
Copy link
Contributor Author

We are setting the value of winp with recv, but can you achieve this by simply deleting the line that overwrites it with zero?

@Biswa96
Copy link
Owner

Biswa96 commented Nov 15, 2024

Fixed in above PR.

@Biswa96 Biswa96 closed this as completed Nov 15, 2024
@mintty
Copy link
Contributor

mintty commented Nov 22, 2024

Thanks for taking this patch. Can you make it a release please, for easier integration in wsltty?

@Biswa96
Copy link
Owner

Biswa96 commented Nov 22, 2024

Released v0.13.

@mintty
Copy link
Contributor

mintty commented Nov 24, 2024

Sorry I didn't test before asking for a release.
But unfortunately, this patch (and thus also 0.13) makes wslbridge2 fail on my systems.
I don't see why this small change would break the backend; maybe a corresponding change in the frontend would also be needed?

@mikoto2000
Copy link
Contributor Author

@mintty
What exactly does it mean when it breaks?

I rebuilt and run it on Cygwin.(./wslbridge2 --login)

It works, but it seems to be in a state where the prompt is not displayed until several Enter keys are pressed after wslbridge2 starts.

Also, strangely, when I built and ran wslbridge2 v0.12, it terminated with an ERROR: GetVmId:312: CreateLxProcess: NULL 参照ポインターがスタブに渡されました。 error. Maybe my environment is bad.

@mintty
Copy link
Contributor

mintty commented Nov 25, 2024

WSL V1: it hangs, blank terminal window
WSL V2: it terminates, window closes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants