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