mirror of
https://github.com/tmux/tmux.git
synced 2026-10-16 00:14:23 +00:00
Redraw when pixel sizes change.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: tty-keys.c,v 1.217 2026/10/12 12:26:46 nicm Exp $ */
|
||||
/* $OpenBSD: tty-keys.c,v 1.218 2026/10/14 08:33:19 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
|
||||
@@ -1914,7 +1914,8 @@ tty_keys_winsz(struct tty *tty, const char *buf, size_t len, size_t *size,
|
||||
return (0);
|
||||
|
||||
/* Window size in characters. */
|
||||
tty_set_size(tty, sx, sy, tty->xpixel, tty->ypixel);
|
||||
if (tty_set_size(tty, sx, sy, tty->xpixel, tty->ypixel))
|
||||
server_redraw_client(c);
|
||||
return (0);
|
||||
} else if (sscanf(tmp, "4;%u;%u", &ypixel, &xpixel) == 2) {
|
||||
*size = end + 1;
|
||||
@@ -1924,7 +1925,8 @@ tty_keys_winsz(struct tty *tty, const char *buf, size_t len, size_t *size,
|
||||
/* Window size in pixels. */
|
||||
char_x = (xpixel && tty->sx) ? xpixel / tty->sx : 0;
|
||||
char_y = (ypixel && tty->sy) ? ypixel / tty->sy : 0;
|
||||
tty_set_size(tty, tty->sx, tty->sy, char_x, char_y);
|
||||
if (tty_set_size(tty, tty->sx, tty->sy, char_x, char_y))
|
||||
server_redraw_client(c);
|
||||
tty_invalidate(tty);
|
||||
|
||||
tty->flags &= ~TTY_WINSIZEQUERY;
|
||||
|
||||
Reference in New Issue
Block a user