Skip to content

Named persistent workspaces: ensures unique identifiers #11161

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

arnaud-ma
Copy link

Describe your PR, what does it fix/add?

In this calll:

Hyprland/src/Compositor.cpp

Lines 3101 to 3107 in 5075850

void CCompositor::ensurePersistentWorkspacesPresent(const std::vector<SWorkspaceRule>& rules, PHLWORKSPACE pWorkspace) {
if (!m_lastMonitor)
return;
for (const auto& rule : rules) {
if (!rule.isPersistent)
continue;

All named persistent rules had the exact same ID, so only the first one was created. See #11146. This PR fixes this by checking ID uniqueness not only across existing workspaces, but also across persistent ones (which might not yet exist).

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

Is it ready for merging, or does it need work?

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.

lgtm, just misses tests for this to not happen again.

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 this pull request may close these issues.

2 participants