expo: fix workspace_method with first

fixes #113
This commit is contained in:
Vaxry 2024-04-03 23:35:10 +01:00
parent e667797142
commit b93f6953ba

View file

@ -78,12 +78,21 @@ COverview::COverview(PHLWORKSPACE startedOn_, bool swipe_) : startedOn(startedOn
} else { } else {
int currentID = methodStartID; int currentID = methodStartID;
images[0].workspaceID = currentID; images[0].workspaceID = currentID;
auto PWORKSPACESTART = g_pCompositor->getWorkspaceByID(currentID);
if (!PWORKSPACESTART)
PWORKSPACESTART = CWorkspace::create(currentID, pMonitor->ID, std::to_string(currentID));
pMonitor->activeWorkspace = PWORKSPACESTART;
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; std::string s;
currentID = getWorkspaceIDFromString("r+" + std::to_string(i), s); currentID = getWorkspaceIDFromString("r+" + std::to_string(i), s);
image.workspaceID = currentID; image.workspaceID = currentID;
} }
pMonitor->activeWorkspace = startedOn;
} }
g_pHyprRenderer->makeEGLCurrent(); g_pHyprRenderer->makeEGLCurrent();