[FarGroup/FarManager] master: 1. Mantis#0004047: non-modal dialog opened in background. (8ac9d9f4c)

0 views
Skip to first unread message

farg...@farmanager.com

unread,
Jun 1, 2024, 3:30:47 AMJun 1
to farco...@googlegroups.com
Repository : https://github.com/FarGroup/FarManager
On branch : master
Link : https://github.com/FarGroup/FarManager/commit/8ac9d9f4c67d128b39c71b8b42c90ff0a4280af0

>---------------------------------------------------------------

commit 8ac9d9f4c67d128b39c71b8b42c90ff0a4280af0
Author: Vadim Yegorov <z...@bmg.lv>
Date: Sat Jun 1 10:24:51 2024 +0300

1. Mantis#0004047: non-modal dialog opened in background.


>---------------------------------------------------------------

8ac9d9f4c67d128b39c71b8b42c90ff0a4280af0
far/changelog | 5 +++++
far/plugapi.cpp | 14 ++++++++++++++
far/vbuild.m4 | 2 +-
3 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/far/changelog b/far/changelog
index c2f4cbd33..91ff8ab2d 100644
--- a/far/changelog
+++ b/far/changelog
@@ -1,3 +1,8 @@
+--------------------------------------------------------------------------------
+zg 2024-06-01 10:22:55+03:00 - build 6342
+
+1. Mantis#0004047: non-modal dialog opened in background.
+
--------------------------------------------------------------------------------
shmuel 2024-06-01 00:07:40+03:00 - build 6341

diff --git a/far/plugapi.cpp b/far/plugapi.cpp
index 889393dc0..245d52495 100644
--- a/far/plugapi.cpp
+++ b/far/plugapi.cpp
@@ -1006,6 +1006,13 @@ HANDLE WINAPI apiDialogInit(const UUID* PluginId, const UUID* Id, intptr_t X1, i

if (FarDialog->InitOK())
{
+ bool modalInPlace = (Flags & FDLG_NONMODAL) && Global->WindowManager->InModal();
+
+ if (modalInPlace)
+ {
+ Flags &= ~FDLG_NONMODAL;
+ }
+
if (Flags & FDLG_NONMODAL)
FarDialog->SetCanLoseFocus(TRUE);
else
@@ -1043,6 +1050,13 @@ HANDLE WINAPI apiDialogInit(const UUID* PluginId, const UUID* Id, intptr_t X1, i
FarDialog->Process();
Global->WindowManager->PluginCommit();
}
+
+ if (modalInPlace)
+ {
+ apiDialogRun(hDlg);
+ apiDialogFree(hDlg);
+ hDlg = INVALID_HANDLE_VALUE;
+ }
}
}
return hDlg;
diff --git a/far/vbuild.m4 b/far/vbuild.m4
index a1d78f9b6..a21ef1c31 100644
--- a/far/vbuild.m4
+++ b/far/vbuild.m4
@@ -1 +1 @@
-6341
+6342


Reply all
Reply to author
Forward
0 new messages