<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:glogow@fbihome.de" title="Jan-Marek Glogowski <glogow@fbihome.de>"> <span class="fn">Jan-Marek Glogowski</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - No "Paste Special" dialog on Wayland with kf5 vclplug"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=140404">bug 140404</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Assignee</td>
           <td>libreoffice-bugs@lists.freedesktop.org
           </td>
           <td>glogow@fbihome.de
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Blocks</td>
           <td>
                
           </td>
           <td>102495
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>glogow@fbihome.de, m.weghorn@posteo.de
           </td>
           <td>
                
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - No "Paste Special" dialog on Wayland with kf5 vclplug"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=140404#c7">Comment # 7</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - No "Paste Special" dialog on Wayland with kf5 vclplug"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=140404">bug 140404</a>
              from <span class="vcard"><a class="email" href="mailto:glogow@fbihome.de" title="Jan-Marek Glogowski <glogow@fbihome.de>"> <span class="fn">Jan-Marek Glogowski</span></a>
</span></b>
        <pre>I reproduced this with "weston --xwayland" and QT_QPA_PLATFORM=wayland. My
Debian buster is too old, so "kwin_wayland --xwayland" just crashes LO.
Actually just "make debugrun" made LO to start without a SIGSEGV, which doesn't
look like the old KDE Wayland memory corruption bug :-( But I digress...

Debugging shows, that Wayland generates two QClipboard::changed events, one
after LO sets the clipboard and one a bit later. AFAIK the 2nd one is not
triggered by LO directly, but I didn't try to debug Qt. Both have LO set as
owners of the clipboard, but the previous assumption of the code, "set
clipboard == one notification event", is broken by this, so the 2nd
notification is actually handled as lost ownership, so LO won't handle it using
the "internal" clipboard, resulting multiple bugs.

Pending patch: <a href="https://gerrit.libreoffice.org/c/core/+/113617">https://gerrit.libreoffice.org/c/core/+/113617</a>

That fixes the bug for me and generally looks more correct and simpler,
code-wise. Hope that doesn't introduce other problems; the clipboard code is a
bit fragile and took quite some time to get "right".</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] KDE VCL backend bugs and enhancements"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=102495">Bug 102495</a>] [META] KDE VCL backend bugs and enhancements
              </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>