fix: apply scroll lock setting on initialization
Co-authored-by: Nick Bolton <nick@symless.com>
This commit is contained in:
@ -334,14 +334,18 @@ void PortalInputCapture::handleZonesChanged(XdpInputCaptureSession *session, con
|
||||
list = g_list_append(list, b);
|
||||
}
|
||||
|
||||
xdp_input_capture_session_set_pointer_barriers(
|
||||
m_session, list,
|
||||
nullptr, // cancellable
|
||||
[](GObject *obj, GAsyncResult *res, gpointer data) {
|
||||
static_cast<PortalInputCapture *>(data)->handleSetPointerBarriers(obj, res);
|
||||
},
|
||||
this
|
||||
);
|
||||
if (list != nullptr) {
|
||||
xdp_input_capture_session_set_pointer_barriers(
|
||||
m_session, list,
|
||||
nullptr, // cancellable
|
||||
[](GObject *obj, GAsyncResult *res, gpointer data) {
|
||||
static_cast<PortalInputCapture *>(data)->handleSetPointerBarriers(obj, res);
|
||||
},
|
||||
this
|
||||
);
|
||||
} else {
|
||||
LOG_WARN("no input capture pointer barriers found");
|
||||
}
|
||||
}
|
||||
|
||||
void PortalInputCapture::glibThread(void *)
|
||||
|
||||
@ -134,8 +134,8 @@ Server::Server(ServerConfig &config, PrimaryClient *primaryClient, deskflow::Scr
|
||||
m_inputFilter->setPrimaryClient(m_primaryClient);
|
||||
|
||||
// Determine if scroll lock is already set. If so, lock the cursor to the
|
||||
// primary screen
|
||||
if (m_primaryClient->getToggleMask() & KeyModifierScrollLock) {
|
||||
// primary screen (unless the user has disabled lock to screen in config)
|
||||
if (!m_disableLockToScreen && (m_primaryClient->getToggleMask() & KeyModifierScrollLock)) {
|
||||
LOG_NOTE("scroll lock is on, locking cursor to screen");
|
||||
m_lockedToScreen = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user