<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - Certain Document in Use dialog does not get focus"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=114466">114466</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Certain Document in Use dialog does not get focus
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>LibreOffice
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>5.4.4.2 release
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows (All)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>UNCONFIRMED
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>minor
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>UI
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>libreoffice-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>baron@caesar.elte.hu
          </td>
        </tr>

        <tr>
          <th>Blocks</th>
          <td>114300
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="http://bugs.documentfoundation.org/attachment.cgi?id=138445" name="attach_138445" title="Screenshot of dialog not getting focus">attachment 138445</a> <a href="http://bugs.documentfoundation.org/attachment.cgi?id=138445&action=edit" title="Screenshot of dialog not getting focus">[details]</a></span>
Screenshot of dialog not getting focus

Prerequisites:
- LibreOffice needs to be associated as default program for opening ODT files.
- A lock file has to be prepared for an existing document (copy it when the
document is open, close it, and copy the lock file back).
- Change user name in the lock file to something else (field between first two
commas).

Repro steps:
- Open Writer, open a different document, and minimize it.
- In a file manager (eg. Explorer) double click the document with the prepared
lock file.

=> Seemingly nothing happens, the Document in Use dialog isn't shown. Once the
Writer window is restored, the dialog can be seen in front.

The dialog pops up/gets the focus normally if the profile location is changed
in the lock file instead of the user name (last field, before the semicolon).
Actually, the window doesn't have to be minimized, in one case it gets the
focus and pops up in front of any application window, in the other it doesn't.
See attached screenshots.

Interestingly, if no document is opened in the background, then the dialog gets
the focus in both cases.

Observed using LO 5.4.4.2 / Windows 7. Might be Windows only.
Seems somewhat similar to <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - On opening a password-protected file, the LibreOffice window is not raised/given focus"
   href="show_bug.cgi?id=49134">bug 49134</a>.

For reference, one dialog is AlreadyOpenQueryBox, the other is
LockFailedQueryBox (based on the texts, STR_ALREADYOPEN_MSG and
STR_LOCKFAILED_MSG).
<a href="https://opengrok.libreoffice.org/xref/core/uui/source/iahndl-locking.cxx">https://opengrok.libreoffice.org/xref/core/uui/source/iahndl-locking.cxx</a></pre>
        </div>
      </p>

        <div id="referenced">
          <hr style="border: 1px dashed #969696">
          <b>Referenced Bugs:</b>
          <ul>
              <li>
                [<a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [META] Bugs and enhancements involving lock files or file locking"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=114300">Bug 114300</a>] [META] Bugs and enhancements involving lock files or file locking
              </li>
          </ul>
        </div>
        <br>

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

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