Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f3726023c2 | ||
|
|
cb41683f47 | ||
|
|
629a8ad055 | ||
|
|
4ba0fa00b4 | ||
|
|
f1e73c015a | ||
|
|
926c3540ff | ||
|
|
1aebd83e45 | ||
|
|
8225351145 | ||
|
|
379add8d6f | ||
|
|
ea11ce8664 | ||
|
|
82e9e96f0c |
@@ -4,6 +4,19 @@ Changelog
|
||||
|kitty| is a feature-rich, cross-platform, *fast*, GPU based terminal.
|
||||
To update |kitty|, :doc:`follow the instructions <binary>`.
|
||||
|
||||
0.20.1 [2021-04-19]
|
||||
----------------------
|
||||
|
||||
- icat: Fix some broken GIF images with no frame delays not being animated
|
||||
(:iss:`3498`)
|
||||
|
||||
- hints kitten: Fix sending hyperlinks to their default handler not working
|
||||
(:pull:`3500`)
|
||||
|
||||
- Wayland: Fix regression in previous release causing window decorations to
|
||||
be drawn even when compositor supports server side decorations (:iss:`3501`)
|
||||
|
||||
|
||||
0.20.0 [2021-04-19]
|
||||
----------------------
|
||||
|
||||
|
||||
1
glfw/wl_window.c
vendored
1
glfw/wl_window.c
vendored
@@ -486,6 +486,7 @@ static void setXdgDecorations(_GLFWwindow* window)
|
||||
{
|
||||
if (_glfw.wl.decorationManager)
|
||||
{
|
||||
window->wl.decorations.serverSide = true;
|
||||
window->wl.xdg.decoration =
|
||||
zxdg_decoration_manager_v1_get_toplevel_decoration(
|
||||
_glfw.wl.decorationManager, window->wl.xdg.toplevel);
|
||||
|
||||
@@ -756,6 +756,7 @@ def handle_result(args: List[str], data: Dict[str, Any], target_window_id: int,
|
||||
cwd = data['cwd']
|
||||
program = None if program == 'default' else program
|
||||
if text_type == 'hyperlink':
|
||||
w = boss.window_id_map.get(target_window_id)
|
||||
for m in matches:
|
||||
if w is not None:
|
||||
w.open_url(m, hyperlink_id=1, cwd=cwd)
|
||||
|
||||
@@ -75,7 +75,7 @@ class Frame:
|
||||
def __repr__(self) -> str:
|
||||
canvas = f'{self.canvas_width}x{self.canvas_height}:{self.canvas_x}+{self.canvas_y}'
|
||||
geom = f'{self.width}x{self.height}'
|
||||
return f'Frame(index={self.index}, gap={self.gap}, geom={geom}, canvas={canvas})'
|
||||
return f'Frame(index={self.index}, gap={self.gap}, geom={geom}, canvas={canvas}, dispose={self.dispose.name})'
|
||||
|
||||
|
||||
class ImageData:
|
||||
@@ -153,12 +153,21 @@ def identify(path: str) -> ImageData:
|
||||
data = json.loads(b'[' + p.stdout.rstrip(b',') + b']')
|
||||
first = data[0]
|
||||
frames = list(map(Frame, data))
|
||||
image_fmt = first['fmt'].lower()
|
||||
if image_fmt == 'gif' and not any(f.gap > 0 for f in frames):
|
||||
# Some broken GIF images have all zero gaps, browsers with their usual
|
||||
# idiot ideas render these with a default 100ms gap https://bugzilla.mozilla.org/show_bug.cgi?id=125137
|
||||
# Browsers actually force a 100ms gap at any zero gap frame, but that
|
||||
# just means it is impossible to deliberately use zero gap frames for
|
||||
# sophisticated blending, so we dont do that.
|
||||
for f in frames:
|
||||
f.gap = 100
|
||||
mode = 'rgb'
|
||||
for f in frames:
|
||||
if f.mode == 'rgba':
|
||||
mode = 'rgba'
|
||||
break
|
||||
return ImageData(first['fmt'].lower(), frames[0].canvas_width, frames[0].canvas_height, mode, frames)
|
||||
return ImageData(image_fmt, frames[0].canvas_width, frames[0].canvas_height, mode, frames)
|
||||
|
||||
|
||||
class RenderedImage(ImageData):
|
||||
|
||||
@@ -21,7 +21,7 @@ class Version(NamedTuple):
|
||||
|
||||
appname: str = 'kitty'
|
||||
kitty_face = '🐱'
|
||||
version: Version = Version(0, 20, 0)
|
||||
version: Version = Version(0, 20, 1)
|
||||
str_version: str = '.'.join(map(str, version))
|
||||
_plat = sys.platform.lower()
|
||||
is_macos: bool = 'darwin' in _plat
|
||||
|
||||
@@ -344,7 +344,7 @@ render_run(RenderCtx *ctx, RenderState *rs) {
|
||||
if (pbm.rows > bm_height) {
|
||||
double ratio = pbm.width / (double)pbm.rows;
|
||||
bm_width = (unsigned)(ratio * bm_height);
|
||||
buf = calloc(sizeof(pixel), bm_height * bm_width);
|
||||
buf = calloc(sizeof(pixel), (size_t)bm_height * bm_width);
|
||||
if (!buf) break;
|
||||
downsample_32bit_image(pbm.buf, pbm.width, pbm.rows, pbm.stride, buf, bm_width, bm_height);
|
||||
pbm.buf = buf; pbm.stride = 4 * bm_width; pbm.width = bm_width; pbm.rows = bm_height;
|
||||
@@ -502,7 +502,7 @@ render_line(PyObject *self UNUSED, PyObject *args, PyObject *kw) {
|
||||
float x_offset = 0, y_offset = 0;
|
||||
static const char* kwlist[] = {"text", "width", "height", "font_family", "bold", "italic", "fg", "bg", "x_offset", "y_offset", "right_margin", NULL};
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kw, "|sIIzppkkffI", (char**)kwlist, &text, &width, &height, &family, &bold, &italic, &fg, &bg, &x_offset, &y_offset, &right_margin)) return NULL;
|
||||
PyObject *ans = PyBytes_FromStringAndSize(NULL, width * height * 4);
|
||||
PyObject *ans = PyBytes_FromStringAndSize(NULL, (Py_ssize_t)width * height * 4);
|
||||
if (!ans) return NULL;
|
||||
uint8_t *buffer = (u_int8_t*) PyBytes_AS_STRING(ans);
|
||||
RenderCtx *ctx = (RenderCtx*)create_freetype_render_context(family, bold, italic);
|
||||
|
||||
Reference in New Issue
Block a user