mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 00:19:37 +02:00
Qt: added GetX11WindowAttributes() helper function.
git-svn-id: trunk@51863 -
This commit is contained in:
parent
6d052f5c97
commit
e875017759
@ -266,6 +266,7 @@ type
|
||||
procedure MapX11Window(AWinID: LongWord);
|
||||
{$IFDEF QtUseAccurateFrame}
|
||||
function GetX11WindowRealized(AWinID: LongWord): boolean;
|
||||
function GetX11WindowAttributes(AWinID: LongWord; out ALeft, ATop, ABorder, AWidth, AHeight: integer): boolean;
|
||||
function GetX11SupportedAtoms(AWinID: LongWord; AList: TStrings): boolean;
|
||||
{Ask for _NET_FRAME_EXTENTS,_KDE_NET_WM_SHADOW,_GTK_NET_FRAME_EXTENTS}
|
||||
function GetX11RectForAtom(AWinID: LongWord; const AAtomName: string; out ARect: TRect): boolean;
|
||||
|
@ -367,6 +367,30 @@ begin
|
||||
Result := (AXWinAttr.map_installed > 0) and (AXWinAttr.map_state = 2);
|
||||
end;
|
||||
|
||||
function GetX11WindowAttributes(AWinID: LongWord; out ALeft, ATop, ABorder, AWidth, AHeight: integer): boolean;
|
||||
var
|
||||
d: PDisplay;
|
||||
Attr: TXWindowAttributes;
|
||||
begin
|
||||
Result := False;
|
||||
d := QX11Info_display;
|
||||
ALeft := MAXINT;
|
||||
ATop := MAXINT;
|
||||
ABorder := MAXINT;
|
||||
AWidth := MAXINT;
|
||||
AHeight := MAXINT;
|
||||
XGetWindowAttributes(d, TWindow(AWinID), @Attr);
|
||||
Result := (Attr.map_installed > 0) and (Attr.map_state = 2);
|
||||
if Result then
|
||||
begin
|
||||
ALeft := Attr.x;
|
||||
ATop := Attr.y;
|
||||
ABorder := Attr.border_width;
|
||||
AWidth := Attr.width;
|
||||
AHeight := Attr.height;
|
||||
end;
|
||||
end;
|
||||
|
||||
function GetX11WindowPos(AWinID: LongWord; out ALeft, ATop: integer): boolean;
|
||||
var
|
||||
D: PDisplay;
|
||||
|
Loading…
Reference in New Issue
Block a user