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: on-created-empty runs even if workspace is not created empty #6026

Conversation

Syndelis
Copy link
Contributor

Resolves #5663

About the PR

This PR fixes the on-created-empty workspace rule, which has unintentionally removed in 094bce8 (april 5th) and re-added back in #5452 (april 6th).

The PR originally reused the same code as the original implementation (#3559), but changed to execute the command in CWorkspace's constructor, as requested.

However, when doing so no additional logic was added to guarantee that it would only execute commands when the workspace was, in fact, created empty.

The side-effect is that moving windows to new workspaces trigger the rule just the same.

About the implementation

The implementation tries not to revert the changes from CWorkspace's constructor back to sanityCheckWorkspaces, and instead works within the new implementation to guarantee that the workspace is, in fact, being created empty by relying on the rule that created it to say so.

Copy link
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

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

oke

@vaxerski vaxerski merged commit 33a7b7b into hyprwm:main May 11, 2024
10 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.

Launching / moving a window silently to workspace with on-created-empty rule triggers the rule
2 participants