mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-18 05:49:30 +02:00
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:
parent
7baab65040
commit
4aad165455
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user