Code Monkey home page Code Monkey logo

Comments (3)

juliusHuelsmann avatar juliusHuelsmann commented on August 20, 2024

Hi!

Thanks! I haven't tried out v0.8.4 yet, so I wasn't aware that the flickering issue intensifies with the update. This problem does not occur a lot at my machine, so I didn't look into that extensively.

I think you're right that larger terminals are affected more often; my guess is that it takes more time to redraw the terminal, and therefore the flickering is visible more often. I currently do not know why the flickering appears more with v0.8.4, but I think this commit might be related as it changes the way chunks of the terminal are redrawn. Either way, the flickering issue is not an issue of st, it is either solvable in my patch or a bug of window managers that evoke focus events more than once.

Approaches for solving the issue

  1. there is a manual redraw in the focus function, maybe changing that to tfulldirt helps
  2. I think when I first investigated this issue, I found out that the focus function is called multiple times (switching on and off the focus multiple times when one event would suffice); finding out why that happens might be the key to fixing this issue.

I'm currently busy, and won't be able to have a look at this in the very near future. However, I just pushed a version which performs what I proposed in (1) here; on my machine I did not notice flickering with the patch, but the problem did not occur a lot at my machine in the previous version aswell, so I don't know if this changes anything. It would be awesome if you could check whether that reduces flickering in the new version of your build by applying the following patch:

patch -p1 < mightReduceFlickering.patch.txt

from st.

vide0hanz avatar vide0hanz commented on August 20, 2024

Yeah, happy to help!

Could you double check that .diff you linked me? I manually checked it against my patched build which includes alpha, and the focus patch applied on top of it and the diff does not seem to change anything. Did you mean to remove all instances of tfulldirt or redraw? The diff suggests removing tfulldirt in all areas where there already isn't any instance of it.

Just want to be clear before I start axing things.

EDIT: Hey, I think that fixed it. The diff you linked was indeed backwards, but I was able to work it out based on your actual commits - tested on 0.8.4 and I do not appear to get any flickering at all. I tested it with various terminal apps open as well, all draw the background without any flickering whatsoever on my end. This even seems to improve the drawing of the focused bg as well, before I could occasionally see it drawing the background (probably only noticeable on a high refresh display, and you really have to be looking for it to tell).

I don't think this change should affect any other patches, will just have to use this build for a while to see but I think you can mark this one closed! Thanks again!

from st.

juliusHuelsmann avatar juliusHuelsmann commented on August 20, 2024

Oups sorry; yeah I made an error while generating the patch, it is indeed backwards.

Cool, I'm happy to hear that it seems to work, thanks a lot for testing! I will release a new version of the focus patch with this fix applied when I have some time on my hands and then close this issue.

from st.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.