mirror of
https://github.com/Trensa-Organization/split-monitor-workspaces.git
synced 2025-03-15 19:23:39 +01:00
post-PR fixes
This commit is contained in:
parent
c152797c2b
commit
cc9073520a
1 changed files with 3 additions and 2 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
#include <cstddef>
|
||||||
#include <hyprland/src/Compositor.hpp>
|
#include <hyprland/src/Compositor.hpp>
|
||||||
#include <hyprland/src/config/ConfigManager.hpp>
|
#include <hyprland/src/config/ConfigManager.hpp>
|
||||||
#include <hyprland/src/helpers/Color.hpp>
|
#include <hyprland/src/helpers/Color.hpp>
|
||||||
|
@ -27,7 +28,7 @@ const std::string& getWorkspaceFromMonitor(CMonitor* monitor, const std::string&
|
||||||
// convert to 0-indexed int
|
// convert to 0-indexed int
|
||||||
workspaceIndex = std::stoi(workspace) - 1;
|
workspaceIndex = std::stoi(workspace) - 1;
|
||||||
}
|
}
|
||||||
catch (std::invalid_argument) {
|
catch (std::invalid_argument&) {
|
||||||
Debug::log(WARN, "Invalid workspace index: %s", workspace.c_str());
|
Debug::log(WARN, "Invalid workspace index: %s", workspace.c_str());
|
||||||
return workspace;
|
return workspace;
|
||||||
}
|
}
|
||||||
|
@ -36,7 +37,7 @@ const std::string& getWorkspaceFromMonitor(CMonitor* monitor, const std::string&
|
||||||
return workspace;
|
return workspace;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (workspaceIndex >= g_vMonitorWorkspaceMap[monitor->ID].size()) {
|
if ((size_t)workspaceIndex >= g_vMonitorWorkspaceMap[monitor->ID].size()) {
|
||||||
return workspace;
|
return workspace;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue