|
@@ -11,12 +11,17 @@ uses
|
|
|
|
|
|
procedure _exit(status: cint); cdecl; external clib;
|
|
procedure _exit(status: cint); cdecl; external clib;
|
|
function atexit(func: pointer): cint; cdecl; external clib;
|
|
function atexit(func: pointer): cint; cdecl; external clib;
|
|
|
|
+function setenv(const name, value: pchar; overwrite: cint): cint; cdecl; external clib;
|
|
|
|
|
|
procedure DoExit; cdecl;
|
|
procedure DoExit; cdecl;
|
|
begin
|
|
begin
|
|
_exit(ExitCode);
|
|
_exit(ExitCode);
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+initialization
|
|
|
|
+ if (LowerCase(fpGetEnv(PAnsiChar('XDG_SESSION_TYPE'))) = 'wayland') then
|
|
|
|
+ setenv('QT_QPA_PLATFORM', 'xcb', 1);
|
|
|
|
+
|
|
finalization
|
|
finalization
|
|
// Workaround: https://doublecmd.sourceforge.io/mantisbt/view.php?id=2079
|
|
// Workaround: https://doublecmd.sourceforge.io/mantisbt/view.php?id=2079
|
|
if (UpCase(fpGetEnv(PAnsiChar('XDG_CURRENT_DESKTOP'))) = 'KDE') then
|
|
if (UpCase(fpGetEnv(PAnsiChar('XDG_CURRENT_DESKTOP'))) = 'KDE') then
|