mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
FIX: Push correct window handle to plugins (Qt5)
(cherry picked from commit 72ca6065fd)
This commit is contained in:
parent
bc29e0e0a6
commit
d190bc3b63
3 changed files with 17 additions and 4 deletions
|
|
@ -117,7 +117,8 @@ procedure ShowOpenWithDialog(TheOwner: TComponent; const FileList: TStringList);
|
|||
{$ENDIF}
|
||||
|
||||
function GetControlHandle(AWindow: TWinControl): HWND;
|
||||
function GetWindowHandle(AWindow: TWinControl): HWND;
|
||||
function GetWindowHandle(AWindow: TWinControl): HWND; overload;
|
||||
function GetWindowHandle(AHandle: HWND): HWND; overload;
|
||||
|
||||
implementation
|
||||
|
||||
|
|
@ -892,6 +893,17 @@ begin
|
|||
end;
|
||||
{$ENDIF}
|
||||
|
||||
function GetWindowHandle(AHandle: HWND): HWND;
|
||||
{$IF DEFINED(MSWINDOWS) and DEFINED(LCLQT5)}
|
||||
begin
|
||||
Result:= Windows.GetAncestor(HWND(QWidget_winId(TQtWidget(AHandle).GetContainerWidget)), GA_ROOT);
|
||||
end;
|
||||
{$ELSE}
|
||||
begin
|
||||
Result:= AHandle;
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
{$IF DEFINED(UNIX) AND NOT DEFINED(DARWIN)}
|
||||
procedure ShowOpenWithDialog(TheOwner: TComponent; const FileList: TStringList);
|
||||
begin
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ uses
|
|||
SysConst, LazUTF8, FileUtil,
|
||||
|
||||
//DC
|
||||
uDCUtils, uComponentsSignature, uGlobsPaths, uLng, uOSUtils, DCOSUtils,
|
||||
uDCUtils, uComponentsSignature, uGlobsPaths, uLng, uOSUtils, DCOSUtils, uOSForms,
|
||||
DCDateTimeUtils, DCConvertEncoding, fDialogBox, uDebug, uShowMsg, uLog, uGlobs;
|
||||
|
||||
const
|
||||
|
|
@ -564,7 +564,7 @@ end;
|
|||
procedure TWcxModule.VFSConfigure(Parent: HWND);
|
||||
begin
|
||||
if Assigned(ConfigurePacker) then
|
||||
ConfigurePacker(Parent, FModuleHandle);
|
||||
ConfigurePacker(GetWindowHandle(Parent), FModuleHandle);
|
||||
end;
|
||||
|
||||
function TWcxModule.ReadWCXHeader(hArcData: TArcHandle;
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ uses
|
|||
|
||||
//DC
|
||||
uDCUtils, uLng, uGlobsPaths, uOSUtils, uWfxPluginUtil, fDialogBox, DCOSUtils,
|
||||
DCStrUtils, DCConvertEncoding, uComponentsSignature;
|
||||
DCStrUtils, DCConvertEncoding, uComponentsSignature, uOSForms;
|
||||
|
||||
const
|
||||
WfxIniFileName = 'wfx.ini';
|
||||
|
|
@ -298,6 +298,7 @@ var
|
|||
pwcRemoteName: PWideChar;
|
||||
begin
|
||||
Result:= WFX_NOTSUPPORTED;
|
||||
MainWin:= GetWindowHandle(MainWin);
|
||||
if Assigned(FsExecuteFileW) then
|
||||
begin
|
||||
pwcRemoteName:= GetMem(MAX_PATH * SizeOf(WideChar));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue