Skip to content

Commit

Permalink
expo: fix workspace_method with first
Browse files Browse the repository at this point in the history
fixes #113
  • Loading branch information
vaxerski committed Apr 3, 2024
1 parent e667797 commit b93f695
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions hyprexpo/overview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,21 @@ COverview::COverview(PHLWORKSPACE startedOn_, bool swipe_) : startedOn(startedOn
} else {
int currentID = methodStartID;
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) {
auto& image = images[i];
std::string s;
currentID = getWorkspaceIDFromString("r+" + std::to_string(i), s);
image.workspaceID = currentID;
}

pMonitor->activeWorkspace = startedOn;
}

g_pHyprRenderer->makeEGLCurrent();
Expand Down

0 comments on commit b93f695

Please sign in to comment.