-
-
Notifications
You must be signed in to change notification settings - Fork 692
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
Rework command enqueing to minimize swallowing #2469
Comments
Hello I am new to polybar, I would like to contribute to this issue, is there any place where I could start? |
@madhavpcm Yes, the pending action string is stored in Thanks :) |
I have did some changes to
|
Yeah testing might be tricky here since it relies on the button clicks (or ipc actions) arriving very quickly after each other. I don't think there is a way to trigger this by hand. I also don't think you can write any automated tests for this since the controller relies on an X server running which we can't handle yet in our testing infrastructure. But if you want to just quickly verify things work for you, you could add something like this: m_loop->timer_handle([this]() { trigger_action("notify-send A"); trigger_action("notify-send B"); })->start(500, 0); This will trigger two actions directly after one another (they should each create a notification popup) after about half a second. Add this line directly before we set |
Yes, that looks alright :) |
Im terribly sorry for the messy commits in the PR, I keep forgetting one thing or the other before committing. Kind of a beginner with git and pull requests. Thanks alot for the help! |
Don't worry about that one bit. That's why we have PR reviews and formatting tools ;) I appreciate the effort |
Thanks Alot! I will work on my approach, looking forward to contribute more in the near future :). |
Fixes #2469 * made inputdata to queue<string> * changed back to front * fixed move semantics issue while popping queue * Removed ide file * commented test lines * review changes * review changes * Update CHANGELOG.md * Cleanup Co-authored-by: patrick96 <p.ziegler96@gmail.com>
Is your feature request related to a problem? Please describe.
It is currently not possible to call
m_sig.emit(button_press{*});
more than once beforem_inputdata
is cleared in the next iteration of the eventqueue worker loop. This is a problem, for example, if more than one action need to be triggered in the same method call.Why does polybar need this feature?
This feature would make the core system underlying polybar considerably more flexible, and would allow for easier and faster implementation of some features.
Describe the solution you'd like
Instead of
m_inputdata
there could be a queue of input data strings.Describe alternatives you've considered
One alternative is to not emit many signals one after the other, and instead store the signals and call them after a short delay, but this increases complexity and makes everything more prone to bugs.
Additional context
Results in
The text was updated successfully, but these errors were encountered: