mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 02:19:57 +02:00
Gtk3: added IsWayland helper function.
This commit is contained in:
parent
2219f01ce4
commit
03fa715e23
@ -47,6 +47,7 @@ type
|
||||
|
||||
TGtk3WidgetSet = class(TWidgetSet)
|
||||
private
|
||||
FIsWayland: boolean;
|
||||
FActivityCounter: integer;
|
||||
FMainPoll: PGPollFD;
|
||||
FGtk3Application: PGtkApplication;
|
||||
@ -95,6 +96,7 @@ type
|
||||
FDragImageLock: Boolean;
|
||||
|
||||
public
|
||||
function IsWayland: boolean;
|
||||
function CreateDCForWidget(AWidget: PGtkWidget; AWindow: PGdkWindow; cr: Pcairo_t): HDC;
|
||||
procedure AddWindow(AWindow: PGtkWindow);
|
||||
{$IFDEF UNIX}
|
||||
|
@ -73,6 +73,11 @@ begin
|
||||
FGtk3Application^.register(nil, nil);
|
||||
end;
|
||||
GTK3WidgetSet := Self;
|
||||
{$IFDEF UNIX}
|
||||
FIsWayland := CompareText(G_OBJECT_TYPE_NAME(gdk_display_get_default),'gdkwaylanddisplay') = 0;
|
||||
{$ELSE}
|
||||
FIsWayland := False;
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
procedure TGtk3WidgetSet.Gtk3Destroy;
|
||||
@ -130,6 +135,11 @@ begin
|
||||
DeleteAndNilObject(FSysColorBrushes[i]);
|
||||
end;
|
||||
|
||||
function TGtk3WidgetSet.IsWayland: boolean;
|
||||
begin
|
||||
Result := FIsWayland;
|
||||
end;
|
||||
|
||||
{$IFNDEF UNIX}
|
||||
procedure TGtk3WidgetSet.DoWakeMainThread(Sender: TObject);
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user