Skip to content

Commit

Permalink
workspace: fix workspace name selector returning true early (hyprwm#5571
Browse files Browse the repository at this point in the history
)
  • Loading branch information
thejch authored and lisuke committed Apr 15, 2024
1 parent 1135d1d commit 28d15d1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/desktop/Workspace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -334,10 +334,10 @@ bool CWorkspace::matchesStaticSelector(const std::string& selector_) {

prop = prop.substr(2, prop.length() - 3);

if (prop.starts_with("s:"))
return m_szName.starts_with(prop.substr(2));
if (prop.starts_with("e:"))
return m_szName.ends_with(prop.substr(2));
if (prop.starts_with("s:") && !m_szName.starts_with(prop.substr(2)))
return false;
if (prop.starts_with("e:") && !m_szName.ends_with(prop.substr(2)))
return false;

const auto WANTSNAMED = configStringToInt(prop);

Expand Down

0 comments on commit 28d15d1

Please sign in to comment.