<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - CMIS dialog advances beyond lower right corner of the screen"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=137471#c12">Comment # 12</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - CMIS dialog advances beyond lower right corner of the screen"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=137471">bug 137471</a>
              from <span class="vcard"><a class="email" href="mailto:m.weghorn@posteo.de" title="Michael Weghorn <m.weghorn@posteo.de>"> <span class="fn">Michael Weghorn</span></a>
</span></b>
        <pre>(In reply to Michael Weghorn from <a href="show_bug.cgi?id=137471#c11">comment #11</a>)
<span class="quote">> Indeed, with <a href="https://gerrit.libreoffice.org/c/core/+/105181">https://gerrit.libreoffice.org/c/core/+/105181</a> (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).</span >

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
<a href="https://gerrit.libreoffice.org/c/core/+/105181">https://gerrit.libreoffice.org/c/core/+/105181</a> (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.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>