Rather than immediately converting a color palette index into an RGB
value for a cell color, when a palette color is used track the palette
color directly in the cell state and convert to an RGB value in the
renderer.
This causes palette color changes to take effect immediately instead of
only for newly drawn cells.
Fixes#1198
This adds a fix similar to what we discovered with termio messages: we
attempt to send a surface message but if the queue is full we unlock the
terminal state and try again waiting forever.
In all cases, its safe to unlock the mutex while sending the message, no
scenario we send a surface message requires this lock to be held.
This adds libX11 to the (wrapped) binary RUNPATH in the Nix package
fixupPhase, to ensure that the dlopen we are doing of it now in #1193
functions correctly.
Note that we patch ".ghostty-wrapped" here, as this is now the main
binary after #1104.
This fixes an issue in that when running under X11, when a modifier key
is pressed, the modifier state will "lag" behind what should be current.
This is due to how X11 sends modifiers in events, i.e. it sends the
state from right before the key press, and does not include the effects
of the key press itself.
This is corrected by checking the X event queue directly for a pending
XkbStateNotify event (we mask this on modifiers), and setting the
modifiers off of that if we find one. If not, we fall back to the GDK
call.
The V-1 Test script was missing a printf statement. Add the missing
statement to make the expected output correct.
Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
The test script for `el` shows the cursor being on the right side of
`X`, however in xterm and ghostty the cursor is _on_ the `X`. Delete the
cursor position and add a comment on where the cursor should be.
The `CUB` V2 test script has a trailing echo which pushes the cursor
down one line, making the expected output incorrect. Remove the `echo`
command so the cursor position is as shown.
Fixes#1183
I'm not sure why the original logic was there. When I translated the
original test cases to shell and ran them in xterm, they did NOT match
what Ghostty expected. This updates the tests to match xterm and removes
this case. We can add back in more tests if/when we figure out under
what scenario this original logic was correct (if it ever was).