mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-30 11:10:23 +02:00
Qt6: use x11Display() from Qt's QNativeInterface, so our X11OpenDisplay() won't open another descriptor
This commit is contained in:
parent
944332963e
commit
7c5b20806e
@ -5554,6 +5554,10 @@ function QGuiApplication_isSavingSession(handle: QGuiApplicationH): Boolean; cde
|
||||
function QGuiApplication_applicationState(): QtApplicationState; cdecl; external Qt6PasLib name 'QGuiApplication_applicationState';
|
||||
function QGuiApplication_highDpiScaleFactorRoundingPolicy(): QtHighDpiScaleFactorRoundingPolicy; cdecl; external Qt6PasLib name 'QGuiApplication_highDpiScaleFactorRoundingPolicy';
|
||||
procedure QGuiApplication_setHighDpiScaleFactorRoundingPolicy(const policy: QtHighDpiScaleFactorRoundingPolicy); cdecl; external Qt6PasLib name 'QGuiApplication_setHighDpiScaleFactorRoundingPolicy';
|
||||
{$IFDEF BINUX}
|
||||
function QGuiApplication_x11Display(handle: QGuiApplicationH): Pointer; cdecl; external Qt6PasLib name 'QGuiApplication_x11Display';
|
||||
function QGuiApplication_xcbConnection(handle: QGuiApplicationH): Pointer; cdecl; external Qt6PasLib name 'QGuiApplication_xcbConnection';
|
||||
{$ENDIF}
|
||||
|
||||
|
||||
type
|
||||
|
@ -546,7 +546,7 @@ end;
|
||||
function TQtWidgetSet.x11Display: PDisplay;
|
||||
begin
|
||||
if FX11Display = nil then
|
||||
FX11Display := XOpenDisplay(nil);
|
||||
FX11Display := PDisplay(QGuiApplication_x11Display(QGuiApplicationH(QCoreApplication_instance())));
|
||||
Result := FX11Display;
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
Loading…
Reference in New Issue
Block a user