fix(wayland): reset clipboard portal state when EnableClipboard changes

give the portal a fresh chance to grant clipboard when the user toggles
the setting, instead of staying stuck on whatever it decided last time.
This commit is contained in:
ElCruncharino 2026-09-02 17:46:48 -04:00 committed by Nick Bolton
parent 0ab18b86b3
commit a930c87ea4

View file

@ -73,6 +73,10 @@ void ServerConfigDialog::save()
// now that the dialog has been accepted, copy the new server config to the // now that the dialog has been accepted, copy the new server config to the
// original one, which is a reference to the one in MainWindow. // original one, which is a reference to the one in MainWindow.
setOriginalServerConfig(serverConfig()); setOriginalServerConfig(serverConfig());
if (Settings::value(Settings::Server::EnableClipboard).toBool() != m_enableClipboard) {
Settings::setValue(Settings::Server::XdpRestoreToken, QString());
Settings::setValue(Settings::Server::XdpClipboardRetried, false);
}
Settings::setValue(Settings::Server::Protocol, networkProtocolToOption(m_protocol)); Settings::setValue(Settings::Server::Protocol, networkProtocolToOption(m_protocol));
Settings::setValue(Settings::Server::EnableClipboard, m_enableClipboard); Settings::setValue(Settings::Server::EnableClipboard, m_enableClipboard);
Settings::setValue(Settings::Server::ClipboardSize, m_clipboardSize); Settings::setValue(Settings::Server::ClipboardSize, m_clipboardSize);