pytermgui icon indicating copy to clipboard operation
pytermgui copied to clipboard

Remove redraw flashing

Open Tired-Fox opened this issue 2 years ago • 1 comments
trafficstars

All instances of redrawing will now call \x1b[H to go to home position and then draw over all characters on the screen. This removed screen flickering for many if not most of terminal emulators. When a full redraw is needed, when the terminal resizes, the redraw is set to full and will fully clear the screen instead of going to home.

Tired-Fox avatar Jun 25 '23 19:06 Tired-Fox

Hey! Sorry about the delay.

Unfortunately it seems this is gonna be a bit more complicated. When windows are drawn we only draw their current state, and as a result not doing a full clear is causing a whole lot of ghosting to happen.

I remember dealing with this a long time ago; there are ways to get around it. We could, for example keep track of windows that changed sizes and draw a "blank" that fills up their previous space, or we could also make the whole "home clear" an optional feature of the WindowManager, so people who rely on windows getting resized/moved around don't run into this problem.

I'll try to think of things we could do to get around it, but it's probably gonna involve having a new look at the compositor. As I mentioned in the Discord I do have a solution to this, but unfortunately it isn't compatible with practically any of PTG's underbelly.

Thank you!

bczsalba avatar Jul 06 '23 11:07 bczsalba