mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-11-17 05:09:31 +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 GetQtVersion: String;
|
||||||
function QtVersionCheck(const AMajor, AMinor, AMicro: Integer): Boolean;
|
function QtVersionCheck(const AMajor, AMinor, AMicro: Integer): Boolean;
|
||||||
{$IFDEF HASX11}
|
{$IFDEF HASX11}
|
||||||
|
function IsWayland: Boolean; {this is not X11 but wayland !}
|
||||||
function IsCurrentDesktop(AWidget: QWidgetH): Boolean;
|
function IsCurrentDesktop(AWidget: QWidgetH): Boolean;
|
||||||
function X11Raise(AHandle: HWND): boolean;
|
function X11Raise(AHandle: HWND): boolean;
|
||||||
function X11GetActiveWindow: QWidgetH;
|
function X11GetActiveWindow: QWidgetH;
|
||||||
|
|||||||
@ -1,10 +1,17 @@
|
|||||||
{%MainUnit qtint.pp}
|
{%MainUnit qtint.pp}
|
||||||
|
|
||||||
|
function IsWayland: Boolean;
|
||||||
|
begin
|
||||||
|
Result := GetEnvironmentVariable('XDG_SESSION_TYPE') = 'wayland';
|
||||||
|
end;
|
||||||
|
|
||||||
function IsOldKDEInstallation: Boolean;
|
function IsOldKDEInstallation: Boolean;
|
||||||
var
|
var
|
||||||
Display: PDisplay;
|
Display: PDisplay;
|
||||||
i: longint;
|
i: longint;
|
||||||
begin
|
begin
|
||||||
|
if IsWayland then
|
||||||
|
exit(False);
|
||||||
//if we are under KDE4, it's already recent one.
|
//if we are under KDE4, it's already recent one.
|
||||||
Result := not ((GetEnvironmentVariable('KDE_SESSION_VERSION') = '4') or
|
Result := not ((GetEnvironmentVariable('KDE_SESSION_VERSION') = '4') or
|
||||||
(GetEnvironmentVariable('KDE_SESSION_VERSION') = '5')
|
(GetEnvironmentVariable('KDE_SESSION_VERSION') = '5')
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user