mirror of
https://github.com/wez/wezterm.git
synced 2024-12-29 00:21:57 +03:00
x11: set minimum increment size to 1x1 cells
Depending on the amount of padding, we could previously resize to get a negative size displayed by the window manager's overlay (e.g., 80x-1 for a very short window displaying zero terminal lines and only partially showing the top of the tabs). We would also like to avoid 80x0 or 0x24 dimensions as these can render funny. For example, when there is a lot of padding, an 80x0 size can still show part of the top of the first line despite it being a cell height of zero.
This commit is contained in:
parent
0462f318d7
commit
b0193850be
@ -1566,13 +1566,15 @@ impl XWindowInner {
|
|||||||
fn set_resize_increments(&mut self, incr: ResizeIncrement) -> anyhow::Result<()> {
|
fn set_resize_increments(&mut self, incr: ResizeIncrement) -> anyhow::Result<()> {
|
||||||
use xcb_util::*;
|
use xcb_util::*;
|
||||||
let hints = xcb_size_hints_t {
|
let hints = xcb_size_hints_t {
|
||||||
flags: XCB_ICCCM_SIZE_HINT_P_RESIZE_INC | XCB_ICCCM_SIZE_HINT_BASE_SIZE,
|
flags: XCB_ICCCM_SIZE_HINT_P_MIN_SIZE
|
||||||
|
| XCB_ICCCM_SIZE_HINT_P_RESIZE_INC
|
||||||
|
| XCB_ICCCM_SIZE_HINT_BASE_SIZE,
|
||||||
x: 0,
|
x: 0,
|
||||||
y: 0,
|
y: 0,
|
||||||
width: 0,
|
width: 0,
|
||||||
height: 0,
|
height: 0,
|
||||||
min_width: 0,
|
min_width: (incr.base_width + incr.x).into(),
|
||||||
min_height: 0,
|
min_height: (incr.base_height + incr.y).into(),
|
||||||
max_width: 0,
|
max_width: 0,
|
||||||
max_height: 0,
|
max_height: 0,
|
||||||
width_inc: incr.x.into(),
|
width_inc: incr.x.into(),
|
||||||
|
Loading…
Reference in New Issue
Block a user