UPD: Enable native Wayland support (Qt5, Lazarus >= 2.2.0)

(cherry picked from commit 178f2bf71b)
This commit is contained in:
Alexander Koblov 2022-07-07 21:34:54 +03:00
commit 0eb417d153

View file

@ -7,14 +7,16 @@ interface
implementation
uses
InitC, BaseUnix;
InitC, BaseUnix, LCLVersion;
procedure _exit(status: cint); cdecl; external clib;
function setenv(const name, value: pchar; overwrite: cint): cint; cdecl; external clib;
{$IF LCL_FULLVERSION < 2020000}
initialization
if (LowerCase(fpGetEnv(PAnsiChar('XDG_SESSION_TYPE'))) = 'wayland') then
setenv('QT_QPA_PLATFORM', 'xcb', 1);
{$ENDIF}
finalization
// Workaround: https://doublecmd.sourceforge.io/mantisbt/view.php?id=2079