mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-13 00:20:06 +01:00
Qt: added IsWayland helper routine
git-svn-id: trunk@51907 -
This commit is contained in:
parent
565dc69ebc
commit
9309190166
@ -252,6 +252,7 @@ type
|
||||
function GetQtVersion: String;
|
||||
function QtVersionCheck(const AMajor, AMinor, AMicro: Integer): Boolean;
|
||||
{$IFDEF HASX11}
|
||||
function IsWayland: Boolean; {this is not X11 but wayland !}
|
||||
function IsCurrentDesktop(AWidget: QWidgetH): Boolean;
|
||||
function X11Raise(AHandle: HWND): boolean;
|
||||
function X11GetActiveWindow: QWidgetH;
|
||||
|
||||
@ -1,10 +1,17 @@
|
||||
{%MainUnit qtint.pp}
|
||||
|
||||
function IsWayland: Boolean;
|
||||
begin
|
||||
Result := GetEnvironmentVariable('XDG_SESSION_TYPE') = 'wayland';
|
||||
end;
|
||||
|
||||
function IsOldKDEInstallation: Boolean;
|
||||
var
|
||||
Display: PDisplay;
|
||||
i: longint;
|
||||
begin
|
||||
if IsWayland then
|
||||
exit(False);
|
||||
//if we are under KDE4, it's already recent one.
|
||||
Result := not ((GetEnvironmentVariable('KDE_SESSION_VERSION') = '4') or
|
||||
(GetEnvironmentVariable('KDE_SESSION_VERSION') = '5')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user