hyprexpo: chase hyprland

This commit is contained in:
Mihai Fufezan 2024-06-23 21:46:19 +03:00
parent 667ea74c36
commit dbd1f372cf
Signed by: fufexan
SSH key fingerprint: SHA256:SdnKmEpJrDu1+2UO1QpB/Eg4HKcdDi6n+xSRqFNJVpg

View file

@ -42,8 +42,7 @@ COverview::COverview(PHLWORKSPACE startedOn_, bool swipe_) : startedOn(startedOn
Debug::log(ERR, "[he] invalid workspace_method");
else {
methodCenter = method[0] == "center";
std::string s;
methodStartID = getWorkspaceIDFromString(method[1], s);
methodStartID = getWorkspaceIDNameFromString(method[1]).id;
if (methodStartID == WORKSPACE_INVALID)
methodStartID = pMonitor->activeWorkspaceID();
}
@ -57,8 +56,7 @@ COverview::COverview(PHLWORKSPACE startedOn_, bool swipe_) : startedOn(startedOn
int backtracked = 0;
for (size_t i = 1; i < images.size() / 2; ++i) {
std::string s;
currentID = getWorkspaceIDFromString("r-" + std::to_string(i), s);
currentID = getWorkspaceIDNameFromString("r-" + std::to_string(i)).id;
if (currentID >= firstID)
break;
@ -68,9 +66,8 @@ COverview::COverview(PHLWORKSPACE startedOn_, bool swipe_) : startedOn(startedOn
for (size_t i = 0; i < SIDE_LENGTH * SIDE_LENGTH; ++i) {
auto& image = images[i];
std::string s;
currentID =
getWorkspaceIDFromString("r" + ((int64_t)i - backtracked < 0 ? std::to_string((int64_t)i - backtracked) : "+" + std::to_string((int64_t)i - backtracked)), s);
getWorkspaceIDNameFromString("r" + ((int64_t)i - backtracked < 0 ? std::to_string((int64_t)i - backtracked) : "+" + std::to_string((int64_t)i - backtracked))).id;
image.workspaceID = currentID;
}
} else {
@ -85,8 +82,7 @@ COverview::COverview(PHLWORKSPACE startedOn_, bool swipe_) : startedOn(startedOn
for (size_t i = 1; i < SIDE_LENGTH * SIDE_LENGTH; ++i) {
auto& image = images[i];
std::string s;
currentID = getWorkspaceIDFromString("r+" + std::to_string(i), s);
currentID = getWorkspaceIDNameFromString("r+" + std::to_string(i)).id;
image.workspaceID = currentID;
}