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/upower: upower module selection with multiple devices #3554

Merged

Conversation

3u13r
Copy link
Contributor

@3u13r 3u13r commented Aug 31, 2024

While looping over all the upower devices, the currently set device that will be rendered in the waybar, is overridden. Since the loop doesn't end when the device is found, the upDevice_ is overridden with NULL in the iteration for the next device.

Now we only override upDevice_ if the current device matches the constraints.

Fixes d2a719d ("Redo to minimize code duplication.")
Fixes #3267

While looping over all the upower devices, the currently set device that will be rendered in the waybar, is overridden. Since the loop doesn't end when the device is found, the upDevice_ is overridden with NULL in the iteration for the next device.

Now we only override upDevice_ if the current device matches the constraints.

Fixes d2a719d ("Redo to minimize code duplication.")
Fixes Alexays#3267
@3u13r 3u13r force-pushed the fix/upower/dont-override-existing-upDevice branch from cbae893 to 9b5c2dc Compare August 31, 2024 18:44
@Alexays Alexays merged commit 30f6ed0 into Alexays:master Sep 13, 2024
@Alexays
Copy link
Owner

Alexays commented Sep 13, 2024

LGTM thx :)

@3u13r 3u13r deleted the fix/upower/dont-override-existing-upDevice branch September 13, 2024 09:27
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.

2 participants