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: make address parsing consistent between events and data commands #88

Merged
merged 1 commit into from
Aug 4, 2023

Conversation

Gustash
Copy link
Contributor

@Gustash Gustash commented Aug 4, 2023

#85 actually created issues with data returned from data commands.

The issue stems from the fact that data commands are calling hyprctl with the --json flag enabled. hyprctl returns addresses formatted as 0xDEADBEEF from JSON, but does not do the same with regular output.

Addresses in events are returned as DEADBEEF instead, so this causes inconsistencies in the data when it comes from data commands and when it comes from events.

This PR addresses this issue by sticking with the 0xDEADBEEF format, as that's the format dispatchers are expecting for window addresses. In every event listener where we are parsing window addresses, I simply prepended the matched address with 0x in a helper function.

@Gustash
Copy link
Contributor Author

Gustash commented Aug 4, 2023

I also think this closes #86 as that won't be needed now that addresses are consistently formatted

Copy link
Member

@yavko yavko left a comment

Choose a reason for hiding this comment

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

Oof, well I hope this is finally it

@yavko
Copy link
Member

yavko commented Aug 4, 2023

I also think this closes #86 as that won't be needed now that addresses are consistently formatted

Yup

@yavko yavko merged commit e59a7de into hyprland-community:master Aug 4, 2023
3 checks passed
@Gustash Gustash deleted the fix/event-addr-format branch August 4, 2023 22:53
@Gustash
Copy link
Contributor Author

Gustash commented Aug 4, 2023

Oof, well I hope this is finally it

Same 😅

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