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

vswitch/set-workspace not working as expected #2308

Closed
killown opened this issue Apr 2, 2024 · 0 comments · Fixed by #2312
Closed

vswitch/set-workspace not working as expected #2308

killown opened this issue Apr 2, 2024 · 0 comments · Fixed by #2312
Labels
Milestone

Comments

@killown
Copy link
Contributor

killown commented Apr 2, 2024

Before the recent fixes, this code had been working fine for quite some time. However, it's now encountering issues when attempting to set the view within a specified workspace.

Executing set_workspace({"x": 1, "y": 1}, view_id=10) should move the view to coordinates x=1, y=1 which is not happening.


def set_workspace(self, workspace, view_id=None, output_id=None):
    x, y = workspace["x"], workspace["y"]
    focused_output = self.get_focused_output()
    if output_id is None:
        output_id = focused_output["id"]
    message = get_msg_template("vswitch/set-workspace", self.methods)
    if message is None:
        return
    message["data"]["x"] = x
    message["data"]["y"] = y
    message["data"]["output-id"] = output_id
    if view_id is not None:
        message["data"]["view-id"] = view_id
    return self.send_json(message)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants