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

Redraw tray on wallpaper change, only if transparent #2604

Merged
merged 3 commits into from Mar 7, 2022
Merged

Redraw tray on wallpaper change, only if transparent #2604

merged 3 commits into from Mar 7, 2022

Conversation

calculon102
Copy link
Contributor

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update
  • Other: Replace this with a description of the type of this PR

Description

The tray manager of polybar listens on multiple atoms for the background of the root window. On change of these atoms, it will redraw its window-background and message its tray-client to redraw also.

On fast changes of of background, this leads to immense messaging and eventual flickering of the systray.

This patch tries to soften the issue in a way, that tray-window and its client will only redraw, if the bar has transparency. If not, there should be no reason to redraw on wallpaper-change.

Related Issues & Documents

calculon102/xgifwallpaper#7

Documentation (check all applicable)

  • This PR requires changes to the Wiki documentation (describe the changes)
  • This PR requires changes to the documentation inside the git repo (please add them to the PR).
  • Does not require documentation changes

Copy link
Member

@patrick96 patrick96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

I unfortunetaly don't know enough about the pseudo-transparency code to say for certain that polybar has to redraw in this way everytime.

@codecov
Copy link

codecov bot commented Mar 7, 2022

Codecov Report

Merging #2604 (cdf9e0f) into master (f5bfbcc) will increase coverage by 0.00%.
The diff coverage is 0.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2604   +/-   ##
=======================================
  Coverage   11.93%   11.93%           
=======================================
  Files         153      153           
  Lines       11297    11294    -3     
=======================================
  Hits         1348     1348           
+ Misses       9949     9946    -3     
Flag Coverage Δ
unittests 11.93% <0.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/x11/tray_manager.cpp 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f5bfbcc...cdf9e0f. Read the comment docs.

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.

None yet

2 participants