Commit Graph

98 Commits

Author SHA1 Message Date
Kovid Goyal
c5583d380d No need to use select() for TTYIO
Instead make read() block with timeout via termios
2018-06-18 11:10:16 +05:30
Kovid Goyal
c094ebce07 Set VMIN to 1 as without it poll() returns immediately even when no data is available to read on macOS 2018-06-09 11:17:12 +05:30
Kovid Goyal
caa20aa081 Use the new tty code in tui as well 2018-06-09 09:06:48 +05:30
Kovid Goyal
5701ec4082 Remove duplicate import 2018-06-08 15:42:42 +05:30
Kovid Goyal
04afe969a0 Fix building on macOS with termios.h 2018-06-08 15:41:40 +05:30
Kovid Goyal
19721014d0 Remote control: Fix kitty @ sometimes failing to read the response from kitty.
Fixes #614
2018-06-08 15:35:01 +05:30
Kovid Goyal
6f2d63eb87 Implement SGR dim
kitty now supports the SGR DIM escape code, which makes text fade into
the background. It works by alpha blending the text color into the
background color. Fixes #446
2018-05-20 10:43:26 +05:30
Kovid Goyal
bb939ed4f8 Remove unused code 2018-04-20 22:19:31 +05:30
James McCoy
215a7689d9 Correct types for various PyArg_ParseTuple/Py_BuildValue calls
Debian's [mips] build failed one of the font tests:

    FAIL: test_sprite_map (kitty_tests.fonts.Rendering)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/<<PKGBUILDDIR>>/kitty_tests/fonts.py", line 48, in test_sprite_map
        self.ae(test_sprite_position_for(0, 1), (0, 1, 1))
        self = <kitty_tests.fonts.Rendering testMethod=test_sprite_map>
    AssertionError: Tuples differ: (0, 0, 0) != (0, 1, 1)

    First differing element 1:
    0
    1

    - (0, 0, 0)
    ?     ^  ^

    + (0, 1, 1)
    ?     ^  ^

This was due to test_sprite_position_for() using the "I" code to parse
into an unsigned short.  Since mips is big endian, the "wrong" byte was
stored into extra_glyphs.data.

This commit changes all similar data type mismatches that were found
from auditing calls to PyArg_ParseTuple/Py_BuildValue.

[mips]: https://buildd.debian.org/status/fetch.php?pkg=kitty&arch=mips&ver=0.9.0-1&stamp=1524126606&raw=0
2018-04-20 08:28:26 -04:00
Kovid Goyal
fa064bf9cf When kitty is built from a git checkout show the current revision in --debug-config 2018-04-01 20:27:31 +05:30
Kovid Goyal
f7f9ceec34 Consolidate signal handling
Move the signal handler for SIGCHLD into child-monitor.c
Makes for cleaner code.
2018-03-12 21:53:02 +05:30
Kovid Goyal
527255e3a1 Fix compilation with gcc 8
Apparently some nitwit Linux distros have made an unreleased compiler
their default compiler. Fixes #376

Fixes various new warnings that GCC 8 issues
2018-03-12 10:38:12 +05:30
Kovid Goyal
c7506496da Unify error logging between python and C 2018-03-04 11:55:47 +05:30
Kovid Goyal
fa87ce72a8 A terminal input parse helper for the kittens 2018-02-06 17:29:05 +05:30
Kovid Goyal
3f24e5b571 A few more places to remove wcwidth from 2018-02-04 22:47:02 +05:30
Kovid Goyal
fc7ec1d3f7 Get rid of the option to use the system wcwidth
The system wcwidth() is often wrong. Not to mention that if you SSH into
a different machine, then you have a potentially different wcwidth. The
only sane way to deal with this is to use the unicode standard.
2018-02-04 21:02:30 +05:30
Kovid Goyal
80301d465b Handle non-BMP combining characters
Use a level of indirection to store combining characters. This allows
combining characters to be stored using only two bytes, even if they are
after USHORT_MAX
2018-01-18 16:25:42 +05:30
Kovid Goyal
ce230b071b Add tests for SGR protocol encoding 2018-01-07 23:48:16 +05:30
Kovid Goyal
239eb8202b Move fork()+exec() of child processes into C
By avoiding python in the child process before exec we ensure that
malloc and other unsafe to use after fork functions are not used.
Should also mean that less pages will need to be copied into thec hild
process, leading to marginally faster startups.
2018-01-04 23:19:09 +05:30
Kovid Goyal
0fcce6ec58 Remove trailing whitespace from native code files 2017-12-20 08:44:47 +05:30
Kovid Goyal
7f19424f2d Fix for kitty sometimes not detecting child death on macOS 2017-12-13 22:20:11 +05:30
Kovid Goyal
5407fa72b4 Start work on rendering with CoreText 2017-12-10 20:28:06 +05:30
Kovid Goyal
c17c6cae4c Support S8C1T mode
That is, eight bit control codes. When in S8C1T mode, kitty will send
only eight bit control codes to the client.
2017-12-05 20:21:12 +05:30
Kovid Goyal
b08f4ab593 Use startup notifications in single instance mode 2017-12-01 12:15:35 +05:30
Kovid Goyal
c8c1a3618c Get the user cache dir path on macOS 2017-12-01 12:15:35 +05:30
Kovid Goyal
d2654db6f0 oops 2017-11-10 14:57:44 +05:30
Kovid Goyal
f25d2ea540 Rip out the old sprite update code 2017-11-09 16:45:45 +05:30
Kovid Goyal
3643a78b18 Start work on line based rendering 2017-11-09 16:45:44 +05:30
Kovid Goyal
6362499fc2 Switch to using glad instead of glew 2017-11-08 15:15:25 +05:30
Kovid Goyal
8672a29503 Use a C based SIGCHLD handler
Running python code in signal handlers makes me nervous
2017-10-23 12:42:03 +05:30
Kovid Goyal
eb5fe234f4 API to easily render a Screen object from python 2017-10-21 10:04:56 +05:30
Kovid Goyal
e558880e8f Load glfw primary selection functions dynamically
Allows kitty to run on wayland. Also dont try to set the window
icon on wayland.
2017-10-18 12:46:32 +05:30
Kovid Goyal
7f3c808e66 Use glfw 3.3 functions for the primary selection
Allows us to drop the dependency on xsel for systems with glfw 3.3
2017-10-17 21:44:56 +05:30
Kovid Goyal
8e64895c23 Framework for testing graphics command parsing 2017-09-30 13:51:47 +05:30
Kovid Goyal
44c897a61a Translate key presses to bytes using a lookup table 2017-09-15 10:45:27 +05:30
Kovid Goyal
a27004da35 Port drag select to C 2017-09-15 10:45:26 +05:30
Kovid Goyal
c683725434 Get rid of the timers infrastructure
It is not needed with a pure state machine.
Note that drag scrolling still has to be ported from using
timers.
2017-09-15 10:45:24 +05:30
Kovid Goyal
6e4b977128 Track application focus state in global state 2017-09-15 10:45:24 +05:30
Kovid Goyal
ca5eb4feb5 Start working on central object to track state 2017-09-15 10:45:23 +05:30
Kovid Goyal
7f6befe4f9 Remove the python OpenGL wrapper as it is no longer needed 2017-09-15 10:45:23 +05:30
Kovid Goyal
9eea178890 Make --debug-gl have zero runtime cost when absent 2017-09-15 10:45:22 +05:30
Kovid Goyal
a1c9c90fc8 Start work on moving shaders.py to C 2017-09-15 10:45:20 +05:30
Kovid Goyal
3072eac222 DRYer sprites 2017-09-15 10:45:17 +05:30
Kovid Goyal
a4580f2126 DRYer glfw 2017-09-15 10:45:17 +05:30
Kovid Goyal
4a27793651 DRYer CoreText 2017-09-15 10:45:17 +05:30
Kovid Goyal
5ed4b29e4b DRYer fontconfig module 2017-09-15 10:45:17 +05:30
Kovid Goyal
b8678871df Remove some unnecessary declarations from data-types.h 2017-09-15 10:45:17 +05:30
Kovid Goyal
457bf8c289 Move gl binding code into its own module 2017-09-15 10:45:17 +05:30
Kovid Goyal
b8acb9b133 Pass cell data to GPU directly
Converts update_cell_range() to a simple memcpy(). The GPU has to do
roughly the same amount of work (there is one extra attribute, and one
extra calculation for reverse video).
2017-09-15 10:45:16 +05:30
Kovid Goyal
f5dbe36cf3 Remove the now useless change tracking code 2017-09-15 10:45:16 +05:30