fix: apply scroll lock setting on initialization

Co-authored-by: Nick Bolton <nick@symless.com>
This commit is contained in:
pika 2025-10-14 21:07:45 -05:00 committed by Chris Rizzitello
parent c11a1caf59
commit 78e394a210
2 changed files with 14 additions and 10 deletions

View file

@ -334,6 +334,7 @@ void PortalInputCapture::handleZonesChanged(XdpInputCaptureSession *session, con
list = g_list_append(list, b); list = g_list_append(list, b);
} }
if (list != nullptr) {
xdp_input_capture_session_set_pointer_barriers( xdp_input_capture_session_set_pointer_barriers(
m_session, list, m_session, list,
nullptr, // cancellable nullptr, // cancellable
@ -342,6 +343,9 @@ void PortalInputCapture::handleZonesChanged(XdpInputCaptureSession *session, con
}, },
this this
); );
} else {
LOG_WARN("no input capture pointer barriers found");
}
} }
void PortalInputCapture::glibThread(void *) void PortalInputCapture::glibThread(void *)

View file

@ -134,8 +134,8 @@ Server::Server(ServerConfig &config, PrimaryClient *primaryClient, deskflow::Scr
m_inputFilter->setPrimaryClient(m_primaryClient); m_inputFilter->setPrimaryClient(m_primaryClient);
// Determine if scroll lock is already set. If so, lock the cursor to the // Determine if scroll lock is already set. If so, lock the cursor to the
// primary screen // primary screen (unless the user has disabled lock to screen in config)
if (m_primaryClient->getToggleMask() & KeyModifierScrollLock) { if (!m_disableLockToScreen && (m_primaryClient->getToggleMask() & KeyModifierScrollLock)) {
LOG_NOTE("scroll lock is on, locking cursor to screen"); LOG_NOTE("scroll lock is on, locking cursor to screen");
m_lockedToScreen = true; m_lockedToScreen = true;
} }