Qt: Set Left & Top of form direct via X11 instead via Qt when we are under OpenBox wm - still to investigate why Qt have totally wrong idea about our position.

git-svn-id: trunk@51890 -
This commit is contained in:
zeljko 2016-03-09 18:45:36 +00:00
parent 7baab65040
commit 4aad165455

View File

@ -542,7 +542,20 @@ begin
TQtWidget(AWinControl.Handle).BeginUpdate;
with R do
begin
{$IF DEFINED(QTUSEACCURATEFRAME) AND DEFINED(HASX11)}
// DO NOT TOUCH THIS UNTIL COMPLETE PROBLEM IS INVESTIGATED
// WITH OPENBOX WM. Qt most of time have wrong assumption about position.
if TQtWidget(AWinControl.Handle).IsFramedWidget and
GetX11WindowRealized(QWidget_winID(TQtWidget(AWinControl.Handle).Widget)) and
(GetWindowManager = 'Openbox') then
begin
SetX11WindowPos(QWidget_winID(TQtWidget(AWinControl.Handle).Widget), Left, Top);
// QApplication_syncX;
end else
TQtWidget(AWinControl.Handle).move(Left, Top);
{$ELSE}
TQtWidget(AWinControl.Handle).move(Left, Top);
{$ENDIF}
TQtWidget(AWinControl.Handle).resize(Right, Bottom);
end;
TQtWidget(AWinControl.Handle).EndUpdate;