ii8 / havoc

minimal terminal emulator for wayland
Other
103 stars 17 forks source link

Doesn't display well in tiling WM #5

Closed MichaelMackus closed 5 years ago

MichaelMackus commented 5 years ago

Hello, I am running havoc inside the Sway WM, and for some reason the terminal does not display well in the WM in tiling mode. The terminal displays fine in floating mode & fullscreen mode.

In tiling mode, there is a dark grey border around the window (very visible since my colors are solarized dark).

Not only this, but when using the terminal, normal ascii text output from the terminal gets chopped off at these borders, resulting in some ugly visual effects (and also clipping some of the displayed text).

Here's an example screenshot:

20190612

MichaelMackus commented 5 years ago

I noticed in the config there are options for setting the default columns & rows for the terminal. Does the terminal properly handle if the WM creates it with a different size than the default?

I find it curious that none of these effects show in fullscreen view, though.

MichaelMackus commented 5 years ago

I've attached below another screenshot that demonstrates the visual glitch I described in my first post. You can also see some debug output for when havoc receives the resize event(s) and they do appear to be properly handled, so something must be wrong with the math to draw the cells to the window (from a cursory glance at the code, the bottom line of the upper right window should be getting re-drawn - but instead, there's a glitch halfway through the line that results in the cursor being clipped).

20190612 2

Another note is that I tested this with borders disabled and the problem was still there, albeit much less prominent.

MichaelMackus commented 5 years ago

After my PR it looks something like this:

20190612 3

Progress! I haven't been able to reproduce the input prompt visual glitch I mentioned earlier in the thread with this patch either.

ii8 commented 5 years ago

The text cutoff issue is now fixed on sway master: https://github.com/swaywm/sway/commit/b59139c2394a1da5da7453611d2f791ec285b43c

There is now also a margin rendered to cover the ugly borders in these kinds of layouts. I want to redo the config sections a bit, once I figure out how exactly the margin config option will be exposed.