internal: use i64 for workspaces in outofbounds

This commit is contained in:
vaxerski 2023-05-09 14:07:58 +01:00
parent 2f87e4c2f3
commit cc4ccfdbfd
2 changed files with 4 additions and 4 deletions

View file

@ -1952,9 +1952,9 @@ void CCompositor::moveWorkspaceToMonitor(CWorkspace* pWorkspace, CMonitor* pMoni
EMIT_HOOK_EVENT("moveWorkspace", (std::vector<void*>{pWorkspace, pMonitor})); EMIT_HOOK_EVENT("moveWorkspace", (std::vector<void*>{pWorkspace, pMonitor}));
} }
bool CCompositor::workspaceIDOutOfBounds(const int& id) { bool CCompositor::workspaceIDOutOfBounds(const int64_t& id) {
int lowestID = 99999; int64_t lowestID = INT64_MAX;
int highestID = -99999; int64_t highestID = INT64_MIN;
for (auto& w : m_vWorkspaces) { for (auto& w : m_vWorkspaces) {
if (w->m_bIsSpecialWorkspace) if (w->m_bIsSpecialWorkspace)

View file

@ -169,7 +169,7 @@ class CCompositor {
void moveWorkspaceToMonitor(CWorkspace*, CMonitor*); void moveWorkspaceToMonitor(CWorkspace*, CMonitor*);
void swapActiveWorkspaces(CMonitor*, CMonitor*); void swapActiveWorkspaces(CMonitor*, CMonitor*);
CMonitor* getMonitorFromString(const std::string&); CMonitor* getMonitorFromString(const std::string&);
bool workspaceIDOutOfBounds(const int&); bool workspaceIDOutOfBounds(const int64_t&);
void setWindowFullscreen(CWindow*, bool, eFullscreenMode); void setWindowFullscreen(CWindow*, bool, eFullscreenMode);
void updateFullscreenFadeOnWorkspace(CWorkspace*); void updateFullscreenFadeOnWorkspace(CWorkspace*);
CWindow* getX11Parent(CWindow*); CWindow* getX11Parent(CWindow*);