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 parsing error when swallowing is active #53

Merged
merged 1 commit into from
May 26, 2023

Conversation

exit91
Copy link
Contributor

@exit91 exit91 commented May 26, 2023

This PR contains a fix for the following bug: When retrieving the active window, parsing fails with

SerdeError(
    Error("data did not match any variant of untagged enum Aux", line: 0, column: 0),
)

Here is an example of the data that triggers this error:

{
    "address": "0x898d4ec0",
    "mapped": true,
    "hidden": false,
    "at": [13, 13],
    "size": [939, 497],
    "workspace": {
        "id": 1,
        "name": "1"
    },
    "floating": false,
    "monitor": 0,
    "class": "org.gnome.SoundRecorder",
    "title": "Tonaufzeichner",
    "initialClass": "org.gnome.SoundRecorder",
    "initialTitle": "Tonaufzeichner",
    "pid": 328198,
    "xwayland": false,
    "pinned": false,
    "fullscreen": false,
    "fullscreenMode": 0,
    "fakeFullscreen": false,
    "grouped": [],
    "swallowing": "0x898b4540"
}

Given that the field swallowing does not contain a Client object but an address, my best guess is that the field pub swallowing: Option<Box<Self>> should be changed to pub swallowing: Option<Box<Address>>.

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.

thanks so much, I looked at hyprland source code, and assumed it was an owned value, and not a pointer lol

@yavko yavko merged commit f1977c7 into hyprland-community:master May 26, 2023
3 checks passed
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