Skip to content

refactor(systray): use initializers#4062

Open
cnjhb wants to merge 1 commit intoawesomeWM:masterfrom
cnjhb:systray
Open

refactor(systray): use initializers#4062
cnjhb wants to merge 1 commit intoawesomeWM:masterfrom
cnjhb:systray

Conversation

@cnjhb
Copy link
Copy Markdown
Contributor

@cnjhb cnjhb commented Feb 26, 2026

No description provided.

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.47%. Comparing base (39143f0) to head (3553c80).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4062      +/-   ##
==========================================
+ Coverage   90.44%   90.47%   +0.02%     
==========================================
  Files         939      939              
  Lines       60346    60342       -4     
  Branches     1145     1145              
==========================================
+ Hits        54582    54592      +10     
+ Misses       5254     5243      -11     
+ Partials      510      507       -3     
Files with missing lines Coverage Δ
systray.c 82.92% <100.00%> (-0.51%) ⬇️

... and 5 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Member

@actionless actionless left a comment

Choose a reason for hiding this comment

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

nice👌😸

.data32 = {
globalconf.timestamp,
globalconf.systray.atom,
globalconf.systray.window,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should there be a NULL, NULL here to be like the old code?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No, when using an initializer, fields that are not specified for initialization will be set to 0, which is NULL.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@Elv13 do you mean to explicitly populate every slot, since the field is defined as uint32_t data32[5] by xcb? I would second this, as a general good practice for code maintainability.

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.

4 participants