Skip to content

Commit

Permalink
fix: support for new pointer wrapper for monitors
Browse files Browse the repository at this point in the history
  • Loading branch information
WhySoBad committed May 9, 2024
1 parent a65bdb0 commit b57c6c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/VirtualDeskManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ void VirtualDeskManager::cycleWorkspaces() {
return;

auto n_monitors = g_pCompositor->m_vMonitors.size();
CMonitor* currentMonitor = g_pCompositor->m_pLastMonitor;
CMonitor* currentMonitor = g_pCompositor->m_pLastMonitor.get();

// TODO: implement for more than two monitors as well.
// This probably requires to compute monitors position
Expand Down Expand Up @@ -281,7 +281,7 @@ void VirtualDeskManager::invalidateAllLayouts() {
}

CMonitor* VirtualDeskManager::getCurrentMonitor() {
CMonitor* currentMonitor = g_pCompositor->m_pLastMonitor;
CMonitor* currentMonitor = g_pCompositor->m_pLastMonitor.get();
// This can happen when we receive the "on disconnect" signal
// let's just take first monitor we can find
if (currentMonitor && (!currentMonitor->m_bEnabled || !currentMonitor->output)) {
Expand Down

0 comments on commit b57c6c0

Please sign in to comment.