monitor: minor adjustments

This commit is contained in:
vaxerski 2023-09-05 22:16:10 +02:00
parent fa3de9b70e
commit c3a83daa1e
2 changed files with 2 additions and 7 deletions

View file

@ -83,9 +83,8 @@ void CMonitor::onConnect(bool noRule) {
wlr_output_enable(output, 0);
if (!wlr_output_commit(output)) {
if (!wlr_output_commit(output))
Debug::log(ERR, "Couldn't commit disabled state on output %s", output->name);
}
Events::listener_change(nullptr, nullptr);
@ -127,11 +126,6 @@ void CMonitor::onConnect(bool noRule) {
m_bEnabled = true;
// create it in the arr
vecPosition = monitorRule.offset;
vecSize = monitorRule.resolution;
refreshRate = monitorRule.refreshRate;
wlr_output_enable(output, 1);
// set mode, also applies

View file

@ -1541,6 +1541,7 @@ bool CHyprRenderer::applyMonitorRule(CMonitor* pMonitor, SMonitorRule* pMonitorR
if (!pMonitor->m_bEnabled) {
pMonitor->onConnect(true); // enable it.
Debug::log(LOG, "Monitor %s is disabled but is requested to be enabled", pMonitor->szName.c_str());
force = true;
}