mirror of
https://github.com/hyprwm/Hyprland.git
synced 2024-09-11 05:15:39 +03:00
pointer: don't update hw cursors on disabled displays
This commit is contained in:
parent
a2643e11a0
commit
abbe71d26d
@ -309,6 +309,11 @@ void CPointerManager::resetCursorImage(bool apply) {
|
||||
return;
|
||||
|
||||
for (auto& ms : monitorStates) {
|
||||
if (!ms->monitor || !ms->monitor->m_bEnabled || !ms->monitor->dpmsStatus) {
|
||||
Debug::log(TRACE, "Not updating hw cursors: disabled / dpms off display");
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ms->cursorFrontBuffer) {
|
||||
if (ms->monitor->output->impl->set_cursor)
|
||||
ms->monitor->output->impl->set_cursor(ms->monitor->output, nullptr, 0, 0);
|
||||
@ -324,6 +329,11 @@ void CPointerManager::updateCursorBackend() {
|
||||
for (auto& m : g_pCompositor->m_vMonitors) {
|
||||
auto state = stateFor(m);
|
||||
|
||||
if (!m->m_bEnabled || !m->dpmsStatus) {
|
||||
Debug::log(TRACE, "Not updating hw cursors: disabled / dpms off display");
|
||||
continue;
|
||||
}
|
||||
|
||||
if (state->softwareLocks > 0 || *PNOHW || !attemptHardwareCursor(state)) {
|
||||
Debug::log(TRACE, "Output {} rejected hardware cursors, falling back to sw", m->szName);
|
||||
state->box = getCursorBoxLogicalForMonitor(state->monitor.lock());
|
||||
|
Loading…
Reference in New Issue
Block a user