From becbf823906d573f43b2b83cbe3004b30a3d213e Mon Sep 17 00:00:00 2001
From: Seth Hillbrand <seth@kipro-pcb.com>
Date: Sun, 12 Jan 2025 19:35:18 -0800
Subject: [PATCH] Keep FP Properties dialogs as quasimodal

The dialogs will launch their own quasi modal dialogs, which reparent
themselves to the TLW.  When closing, on GTK, they will focus the TLW,
leading to events being handled while the initial quasi modal dialog is
still showing.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19385
---
 pcbnew/footprint_editor_utils.cpp | 2 +-
 pcbnew/pcb_edit_frame.cpp         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/pcbnew/footprint_editor_utils.cpp b/pcbnew/footprint_editor_utils.cpp
index 5c88383647..21adc87681 100644
--- a/pcbnew/footprint_editor_utils.cpp
+++ b/pcbnew/footprint_editor_utils.cpp
@@ -170,7 +170,7 @@ void FOOTPRINT_EDIT_FRAME::editFootprintProperties( FOOTPRINT* aFootprint )
     LIB_ID oldFPID = aFootprint->GetFPID();
 
     DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR dialog( this, aFootprint );
-    dialog.ShowModal();
+    dialog.ShowQuasiModal();
 
     // Update library tree and title in case of a name change
     wxDataViewItem treeItem = m_adapter->FindItem( oldFPID );
diff --git a/pcbnew/pcb_edit_frame.cpp b/pcbnew/pcb_edit_frame.cpp
index 196cffc4e7..d683b7bbff 100644
--- a/pcbnew/pcb_edit_frame.cpp
+++ b/pcbnew/pcb_edit_frame.cpp
@@ -2164,7 +2164,7 @@ void PCB_EDIT_FRAME::ShowFootprintPropertiesDialog( FOOTPRINT* aFootprint )
     {
         DIALOG_FOOTPRINT_PROPERTIES dlg( this, aFootprint );
 
-        dlg.ShowModal();
+        dlg.ShowQuasiModal();
         retvalue = dlg.GetReturnValue();
     }