[PATCH] Fix dialog modality settings
authorAkseli Lahtinen <akselmo@akselmo.dev>
Thu, 22 May 2025 14:35:24 +0000 (17:35 +0300)
committerAurélien COUDERC <coucouf@debian.org>
Sun, 8 Jun 2025 12:42:29 +0000 (14:42 +0200)
By default all dialogs are ApplicationModal, thus they block clicking
on any other app while the dialog is open.

Set them to WindowModal so they only block the parent window.

BUG: 504608

Gbp-Pq: Name upstream_9143fc2a_Fix-dialog-modality-settings.patch

src/widgets/kpropertiesdialogbuiltin_p.cpp

index 910ab163030eeabe2bd7cbb9d7fb8ce93236e485..33945cf7ab9c379b885836cc79cff55868be3576 100644 (file)
@@ -1354,6 +1354,7 @@ void KFilePermissionsPropsPlugin::slotShowAdvancedPermissions()
 {
     bool isDir = (d->pmode == PermissionsOnlyDirs) || (d->pmode == PermissionsMixed);
     QDialog dlg(properties);
+    dlg.setWindowModality(Qt::WindowModal);
     dlg.setModal(true);
     dlg.setWindowTitle(i18n("Advanced Permissions"));
 
@@ -2880,6 +2881,7 @@ void KDesktopPropsPlugin::slotAdvanced()
 {
     auto *dlg = new QDialog(d->m_frame);
     dlg->setObjectName(QStringLiteral("KPropertiesDesktopAdv"));
+    dlg->setWindowModality(Qt::WindowModal);
     dlg->setModal(true);
     dlg->setAttribute(Qt::WA_DeleteOnClose);
     dlg->setWindowTitle(i18n("Advanced Options for %1", properties->url().fileName()));