mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-10-16 23:16:01 +00:00
@@ -271,11 +271,11 @@ void updateRelativeCursorCoords() {
|
||||
g_pCompositor->m_pLastWindow->m_vRelativeCursorCoordsOnLastWarp = g_pInputManager->getMouseCoordsInternal() - g_pCompositor->m_pLastWindow->m_vPosition;
|
||||
}
|
||||
|
||||
bool CKeybindManager::tryMoveFocusToMonitor(CMonitor* monitor) {
|
||||
bool CKeybindManager::tryMoveFocusToMonitor(PHLMONITOR monitor) {
|
||||
if (!monitor)
|
||||
return false;
|
||||
|
||||
const auto LASTMONITOR = g_pCompositor->m_pLastMonitor.get();
|
||||
const auto LASTMONITOR = g_pCompositor->m_pLastMonitor.lock();
|
||||
if (!LASTMONITOR)
|
||||
return false;
|
||||
if (LASTMONITOR == monitor) {
|
||||
@@ -1096,7 +1096,7 @@ SDispatchResult CKeybindManager::changeworkspace(std::string args) {
|
||||
static auto PALLOWWORKSPACECYCLES = CConfigValue<Hyprlang::INT>("binds:allow_workspace_cycles");
|
||||
static auto PWORKSPACECENTERON = CConfigValue<Hyprlang::INT>("binds:workspace_center_on");
|
||||
|
||||
const auto PMONITOR = g_pCompositor->m_pLastMonitor.get();
|
||||
const auto PMONITOR = g_pCompositor->m_pLastMonitor.lock();
|
||||
|
||||
if (!PMONITOR)
|
||||
return {.success = false, .error = "Last monitor not found"};
|
||||
@@ -1260,7 +1260,7 @@ SDispatchResult CKeybindManager::moveActiveToWorkspace(std::string args) {
|
||||
}
|
||||
|
||||
auto pWorkspace = g_pCompositor->getWorkspaceByID(WORKSPACEID);
|
||||
CMonitor* pMonitor = nullptr;
|
||||
PHLMONITOR pMonitor = nullptr;
|
||||
const auto POLDWS = PWINDOW->m_pWorkspace;
|
||||
static auto PALLOWWORKSPACECYCLES = CConfigValue<Hyprlang::INT>("binds:allow_workspace_cycles");
|
||||
|
||||
@@ -1795,7 +1795,7 @@ SDispatchResult CKeybindManager::exitHyprland(std::string argz) {
|
||||
}
|
||||
|
||||
SDispatchResult CKeybindManager::moveCurrentWorkspaceToMonitor(std::string args) {
|
||||
CMonitor* PMONITOR = g_pCompositor->getMonitorFromString(args);
|
||||
PHLMONITOR PMONITOR = g_pCompositor->getMonitorFromString(args);
|
||||
|
||||
if (!PMONITOR) {
|
||||
Debug::log(ERR, "Ignoring moveCurrentWorkspaceToMonitor: monitor doesnt exist");
|
||||
@@ -1854,7 +1854,7 @@ SDispatchResult CKeybindManager::focusWorkspaceOnCurrentMonitor(std::string args
|
||||
return {.success = false, .error = "focusWorkspaceOnCurrentMonitor invalid workspace!"};
|
||||
}
|
||||
|
||||
const auto PCURRMONITOR = g_pCompositor->m_pLastMonitor.get();
|
||||
const auto PCURRMONITOR = g_pCompositor->m_pLastMonitor.lock();
|
||||
|
||||
if (!PCURRMONITOR) {
|
||||
Debug::log(ERR, "focusWorkspaceOnCurrentMonitor monitor doesn't exist!");
|
||||
@@ -1944,7 +1944,7 @@ SDispatchResult CKeybindManager::forceRendererReload(std::string args) {
|
||||
continue;
|
||||
|
||||
auto rule = g_pConfigManager->getMonitorRuleFor(m);
|
||||
if (!g_pHyprRenderer->applyMonitorRule(m.get(), &rule, true)) {
|
||||
if (!g_pHyprRenderer->applyMonitorRule(m, &rule, true)) {
|
||||
overAgain = true;
|
||||
break;
|
||||
}
|
||||
@@ -2427,7 +2427,7 @@ SDispatchResult CKeybindManager::dpms(std::string arg) {
|
||||
}
|
||||
|
||||
if (enable)
|
||||
g_pHyprRenderer->damageMonitor(m.get());
|
||||
g_pHyprRenderer->damageMonitor(m);
|
||||
|
||||
m->events.dpmsChanged.emit();
|
||||
}
|
||||
|
Reference in New Issue
Block a user