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

ncvisuals no longer correctly positioned in xterm <357 #2252

Closed
joseluis opened this issue Oct 9, 2021 · 28 comments
Closed

ncvisuals no longer correctly positioned in xterm <357 #2252

joseluis opened this issue Oct 9, 2021 · 28 comments
Assignees
Labels
bitmaps bitmapped graphics (sixel, kitty, mmap) bug Something isn't working
Milestone

Comments

@joseluis
Copy link
Collaborator

joseluis commented Oct 9, 2021

all ncvisuals are rendered at 0,0 when using xterm

@joseluis joseluis added bug Something isn't working bitmaps bitmapped graphics (sixel, kitty, mmap) labels Oct 9, 2021
@dankamongmen
Copy link
Owner

you probably just updated from 368 to 369, with its inverted DECSDM. what version of xterm, what version of notcurses?

@dankamongmen
Copy link
Owner

seeing xterm 369 work just fine with
2021-10-09-104333_884x1415_scrot

working on xterm 369 with notcurses 2.4.5

@dankamongmen
Copy link
Owner

see #1782

@dankamongmen dankamongmen self-assigned this Oct 9, 2021
@dankamongmen dankamongmen added this to the 3.0.0 milestone Oct 9, 2021
@joseluis
Copy link
Collaborator Author

joseluis commented Oct 9, 2021

OK!

I'm using the xterm packaged from my distro, version 353.
And the latest notcurses from master.

@dankamongmen
Copy link
Owner

I'm using the xterm packaged from my distro, version 353. And the latest notcurses from master.

ahhh, ok, i might have fucked up the xterm version check then; i don't think i tested with a sub-369. let's see.

@dankamongmen
Copy link
Owner

i sure did, augh, good find!

@dankamongmen dankamongmen changed the title ncvisuals no longer correctly positioned in xterm ncvisuals no longer correctly positioned in xterm <357 Oct 9, 2021
@dankamongmen
Copy link
Owner

hopefully what i just pushed ought fix it, ugh

@joseluis
Copy link
Collaborator Author

joseluis commented Oct 9, 2021

Mmmm no, it still suffers from the same problem.

For example, the orca in notcurses-demo remains at the top left corner, as well as any other positioned ncvisual.

BTW this is my package: https://packages.ubuntu.com/focal/xterm

@dankamongmen
Copy link
Owner

can you give me a quick screencap of notcurses-info? stderr logs from notcurses-info -v might also prove very useful. thanks!

@joseluis
Copy link
Collaborator Author

joseluis commented Oct 9, 2021

sure

image
info-stderr.txt
info-stdout.txt

@dankamongmen
Copy link
Owner

hrmmm so it's not recognizing XTerm here. note how in mine, on the top line, it says "on XTerm 369". yours is just reflecting your $TERM. is this possibly being run in screen/tmux?

@dankamongmen
Copy link
Owner

so since it can't recognize XTerm (because it's not getting an XTVERSION response), it can't compare versions, and that's why we're getting the failure. the real problem here is that we're not getting an XTVERSION response. why? hrmmmm

@dankamongmen
Copy link
Owner

unsure when xtversion went into xterm, but DA2 has had a version number since at least 1999

Patch #95 - 1999/4/5 - XFree86 3.9Ph use the patch number (e.g., 95) in the secondary DA response, providing user applications a means of determining the version of xterm for feature comparison (request by Bram Moolenaar).

@joseluis
Copy link
Collaborator Author

joseluis commented Oct 9, 2021

is this possibly being run in screen/tmux?

no, it's standalone, run with xterm -tn vte340

@joseluis
Copy link
Collaborator Author

joseluis commented Oct 9, 2021

OK, two things:

  1. regarding xterm detection, it turns out that when I open the xterm window from inside a tmux session... it doesn't show the xterm name, but if I open it from the menu, it does show the right name xterm-256color. That's unexpected...
  2. either way it doesn't change the behaviour of the ncvisuals. In both instances they remain at the top left corner.

@dankamongmen
Copy link
Owner

i'm now reproducing your failure using the ubuntu focal xterm-353 package.

@dankamongmen
Copy link
Owner

this xterm definitely does not respond to XTVERSION.

@dankamongmen
Copy link
Owner

with the change i just committed, we identify XTerm, though not yet get its version, and i don't see any sixels at all.

probably not gonna work on this anymore tonight, but ought get it pretty quickly tomorrow omrning.

@dankamongmen
Copy link
Owner

we now extract these older versions from DA2

@dankamongmen
Copy link
Owner

so i can't get any sixels to display anywhere using this older xterm =[. i'm now at least extracting the version properly etc. @joseluis i assume there has been no change in behavior?

@dankamongmen
Copy link
Owner

according to the XTerm changelog, sixel support has only been present by default since XTerm 359, released 2020-08-17:

Patch #359 - 2020/08/17 .... enable SIXEL feature by default.

@dankamongmen
Copy link
Owner

and when i do a primary device attributes request, we do not see the '4' indicating sixel support:

[schwarzgerat](0) $ 64;1;2;6;9;15;16;17;18;21;22;28c

so how are you seeing sixels with this build at all?

@dankamongmen
Copy link
Owner

i've cherry-picked 69db355 and 0450951 into master.

@dankamongmen
Copy link
Owner

sure

image info-stderr.txt info-stdout.txt

i'm not seeing a sixel here anywhere....?

@dankamongmen
Copy link
Owner

dankamongmen commented Oct 10, 2021

well, i'm extracting XTerm 353 out correctly now, but this ubuntu package definitely does not have sixel support. so i'm very confused as to how you could have been seeing sixels in the upper left.

however, i notice something very interesting....it's answering XTSMGRAPHICS as if it did have support. but the DA1 response clearly indicates no support. i don't believe i've ever seen this happen.

2021-10-10-172759_884x1415_scrot

@dankamongmen
Copy link
Owner

[schwarzgerat](0) $ echo -e '\e[c\e[?2;1;1S'
[schwarzgerat](0) $ 64;1;2;6;9;15;16;17;18;21;22;28c2;0;880;552S

@joseluis
Copy link
Collaborator Author

oh man, don't worry too much about this ass old version of xterm that in two years will be forgotten.

I'm about 1000x times more excited about #2258. I'll close this in a moment if that will help you focus on that one!

@dankamongmen
Copy link
Owner

i mean, there's no cost to leaving it open... but I do now have us identifying the version of pre-XTVERSION XTerm, which is a Good Thing, and we've opened the discussion on #2257, which is a Necessary if Unpleasant Thing, and we fixed a real bug in DECSDM inversion detection in XTerm, which is a Very Good Thing, and we're working as exepected when I test under XTerm 353 as packaged in Ubuntu Focal, which is a Reassuring Thing Though Also a Confusing Thing Given Your Claims, so sure i'm happy to close this up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bitmaps bitmapped graphics (sixel, kitty, mmap) bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants