Qt: added GetX11WindowRealized() helper function

git-svn-id: trunk@51856 -
This commit is contained in:
zeljko 2016-03-08 09:15:47 +00:00
parent 76e8f6c853
commit 1d06283bcf
2 changed files with 13 additions and 0 deletions

View File

@ -265,6 +265,7 @@ type
{force mapping}
procedure MapX11Window(AWinID: LongWord);
{$IFDEF QtUseAccurateFrame}
function GetX11WindowRealized(AWinID: LongWord): 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;

View File

@ -355,6 +355,18 @@ begin
end;
{$IFDEF QtUseAccurateFrame}
function GetX11WindowRealized(AWinID: LongWord): boolean;
var
d: PDisplay;
AXWinAttr: TXWindowAttributes;
begin
Result := False;
d := QX11Info_display;
XGetWindowAttributes(d, TWindow(AWinID), @AXWinAttr);
Result := (AXWinAttr.map_installed > 0) and (AXWinAttr.map_state = 2);
end;
function GetX11WindowPos(AWinID: LongWord; out ALeft, ATop: integer): boolean;
var
D: PDisplay;