Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix flicker #200

Merged
merged 2 commits into from
Mar 9, 2020
Merged

Conversation

PartialVolume
Copy link
Collaborator

This fixes screen flicker seen in the following situations:

These apply in full screen mode ONLY: i.e ALT-F2, Shredos etc.

  1. When selecting a drive using up/down arrow keys
  2. During a wipe the screen flashes at one second intervals.

These apply in a terminal window such as konsole, tmux etc.

  1. When resizing the terminal there was a flicker.

All these problems have been fixed.

Most of the causes of the flicker was an excessive use of wrefresh() which calls
the wnoutrefresh() and doupdate() functions. This can cause flickering when a
number of calls to wrefresh happen at the same time. It is more appropriate to
replace the wrefresh() with wnoutrefresh(), then at an appropriate time call
doupate() just once. The result is that before doupdate() would have been
called multiple times and now it's called once when required.

fixes #115

These apply in full screen mode ONLY: i.e ALT-F2, Shredos etc.
1. When selecting a drive using up/down arrow keys
2. During a wipe the screen flashes at one second intervals.

These apply in a terminal window such as konsole, tmux etc.
1. When resizing the terminal there was a flicker.

All these problems have been fixed.

Most of the causes of the flicker was an excessive use of wrefresh() which calls
the wnoutrefresh() and doupdate() functions. This can cause flickering when a
number of calls to wrefresh happen at the same time. It is more appropriate to
replace the wrefresh() with wnoutrefresh(), then at an appropriate time call
doupate() just once. The result is that before doupdate() would have been
called multiple times and now it's called once when required.

fixes martijnvanbrummelen#115
@PartialVolume PartialVolume merged commit fb00aa0 into martijnvanbrummelen:master Mar 9, 2020
@PartialVolume PartialVolume deleted the fix_flicker branch March 12, 2020 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flicker when stats are updated every second
1 participant