swaywm / sway

i3-compatible Wayland compositor
https://swaywm.org
MIT License
14.41k stars 1.1k forks source link

Resizing font in terminal (urxvt) does not redraw window #3232

Open shioyama opened 5 years ago

shioyama commented 5 years ago

When using urxvt with the resize-font extension, resizing the font of a floating terminal correctly grows/shrinks the sway window, however doing the same in a tiled window changes the font size without correctly adjusting the terminal contents. As a result, e.g. growing the font size can result in your cursor going "off the window" if you scroll down too far.

This situation is fixed as soon as you change desktops, or hide/show the window, etc., at which point Sway seems to redraw the window and everything is fixed. (Reloading configuration also does it.)

This can be reproduced without the extension using an escape sequence, e.g.:

echo -e "\e]710;xft:Sans:size=18\007"

And just scroll down far enough to see your cursor go off the terminal window. The log I've included is what I see in logs when I do this.

I haven't included configuration because I think it's not very relevant; I'm pretty sure this happens in any setup with urxvt.

(Thanks for all the amazing work on Sway btw, mostly everything works really really smoothly!)

shioyama commented 5 years ago

This btw works in i3 (i.e. urxvt terminal size is adjusted when font is resized).

mdeff commented 5 years ago

I can reproduce (on today's master). Here's a screenshot of what happens when I down-size the font in urxvt (ranger file manager). It also gets fixed when I change workspace, focus on the window again, go fullscreen, etc.

20190122_200301

shioyama commented 5 years ago

This seems to still be the situation as of 1.0.rc3.

dave2309 commented 4 years ago

Hi guys, still having this issue with version 1.2, (under voidlinux) Changing fonts or resize current font not leading to an adjustement of the terminal, then bottom lines are off limits. Until a go and back from fullscreen mode or config reload.

shioyama commented 4 years ago

At this point I've pretty much internalized that process of switching to fullscreen and back to fix the issue... but would be nice to not have to do that.