-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
Provide cell-pixel geometry in TIOCGWINSZ #241
Comments
Oh. Edit: should have been filled. I will be fixing that. Edit2: also set x/ypixels at PTY construction and not just at resize events. (https://github.com/christianparpart/contour/blob/master/src/terminal/pty/UnixPty.cpp#L111) |
… only set during resize but not initially. Fixes #241.
Thanks @dankamongmen, I really appreciate your reports. I owe you a beer or two ;-) |
i'm strictly a krokodil / bathsalts / adrenochrome man, though i have been known to quaff some Sterno in my time |
btw i gave the wrong semantics here. i said they should have the cell-pixel geometry; it ought be the window geometry in pixels. |
…ixels Fixes `ioctl(..., TIOCGWINSZ, ...)` pixel values that were only set during resize but not initially. Fixes #241.
confirmed, thanks much holmes!
|
checks out (i've got a scrollbar which could easily be 16 pixels wide)! |
Is this a problem? Just so i understand :)
…On Tue, Jun 22, 2021, 06:58 Nick Black ***@***.***> wrote:
Width: 1446
Height: 660
checks out (i've got a scrollbar which could easily be 16 pixels wide)!
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#241 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAN3O5UWLRGFHVOEI7HALDTUAJ7HANCNFSM47CA72TQ>
.
|
nope, just confirming via |
they're not an exact match, but i think the 16 extra pixels are probably due to the scrollbar. |
Then I shall fix this |
no it's working! i must not be clear |
Abstract
Contour's implementation of the
TIOCGWINSZ
ioctl(2)
doesn't fill in the following two optional fields:Contour supports Sixel. Unfortunately, without this knowledge, it's difficult to use Sixel correctly for anything but trivial work.
Motivation
These fields ought be filled in, as they are by most terminals supporting bitmap graphics (all of which I am aware).
Specification
When
TIOCGWINSZ
is answered by Contour, thews_xpixel
field ought be filled in with the number of native pixels per cell width, andws_ypixel
ought be filled in with the number of native pixels per cell height.When the cell-pixel geometry changes (for instance in response to a font change), the information ought be updated in subsequent
ioctl(2)
s, and ideally aSIGWINCH
ought be delivered as it would upon a cell geometry change.see dankamongmen/notcurses#1805
The text was updated successfully, but these errors were encountered: