[Libreoffice-bugs] [Bug 137471] CMIS dialog advances beyond lower right corner of the screen

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Mon Nov 2 15:27:18 UTC 2020


https://bugs.documentfoundation.org/show_bug.cgi?id=137471

--- Comment #12 from Michael Weghorn <m.weghorn at posteo.de> ---
(In reply to Michael Weghorn from comment #11)
> Indeed, with https://gerrit.libreoffice.org/c/core/+/105181 (v1) applied,
> the mismatch becomes significantly smaller (i.e. the windows no more moves
> as far as before in one cycle, but it still doesn't remain in it's position,
> so there's probably another aspect for this case).

The other piece seems to be that that Qt5Frame::GetWindowState uses
QWidget::geometry() (which excludes the window frame) while
Qt5Frame::SetPosSize (which is called by Qt5Frame::SetWindowState) uses
QWidget::move, which includes the window frame.

In a quick test with this modification on top of
https://gerrit.libreoffice.org/c/core/+/105181 (v1), the remote files dialog
generally opens at the same position again:

diff --git a/vcl/qt5/Qt5Frame.cxx b/vcl/qt5/Qt5Frame.cxx
index 551b5c03c1ff..5619aa2b60f1 100644
--- a/vcl/qt5/Qt5Frame.cxx
+++ b/vcl/qt5/Qt5Frame.cxx
@@ -678,7 +678,7 @@ bool Qt5Frame::GetWindowState(SalFrameState* pState)
     else
     {
         // geometry() is the drawable area, which is wanted here
-        QRect rect = scaledQRect(asChild()->geometry(), devicePixelRatioF());
+        QRect rect = scaledQRect(asChild()->frameGeometry(),
devicePixelRatioF());
         pState->mnX = rect.x();
         pState->mnY = rect.y();
         pState->mnWidth = rect.width();


Note however, that the comment above the changed line explicitly states that
'geometry()' is wanted here!  I'd assume that using QWidget::setGeometry in
Qt5Frame::SetPosSize instead should also have the same effect regarding this
bug report (i.e. correct position restored), but I currently know too little
about how all of this is supposed to work to be able to say whether that's
reasonable without digging deeper into the whole topic.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20201102/bcd314e7/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list