<html>
    <head>
      <base href="https://bugzilla.gnome.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - GdkSelection does not support arbitrary named clipboards/selections on wayland"
   href="https://bugzilla.gnome.org/show_bug.cgi?id=770333">770333</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>GdkSelection does not support arbitrary named clipboards/selections on wayland
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Platform
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>gtk+
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.21.x
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Backend: Wayland
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>gtk-bugs@gtk.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>thomas@tommie-lie.de
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>gtk-bugs@gtk.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>rob@robster.org.uk, wayland-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>GNOME version</th>
          <td>---
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=334080" name="attach_334080" title="Sample program that reproduces the bug.">attachment 334080</a> <a href="attachment.cgi?id=334080&action=edit" title="Sample program that reproduces the bug.">[details]</a></span>
Sample program that reproduces the bug.

GtkClipboard allows "arbitrary named clipboards" (besides "PRIMARY" and
"CLIPBOARD") and makes use of of the GdkSelection functions to access them.
Using this feature makes e.g. gtk_clipboard_wait_for_targets() wait forever
because the gdk_selection_* functions will never return the correct selection
data.


backstory:
file-roller uses its own clipboard name ("_FR_SPECIAL_CLIPBOARD"). With the
recent update from my distribution to Gtk+ 3.20.9, my file-roller was unable to
extract from or navigate within an archive in Wayland. The X11 backend worked
fine. A simple test is to use the latest Gtk+ and file-roller in a Wayland
session and open an archive. All the context menu items in file-roller are
greyed out as is the "Extract" button in the top left corner.


cause(-ish):
The misbehaviour was introduced in
<a href="https://git.gnome.org/browse/gtk%2B/commit/?id=0d30ad2">https://git.gnome.org/browse/gtk%2B/commit/?id=0d30ad2</a> (before this,
file-roller worked fine) but I think it might just be that it made the error
more obvious. The problem with the commit is that
_gdk_wayland_display_convert_selection() now immediately returns if the
selection with the given atom cannot be found. As it can never find
file-roller's custom-named selection, it always returns early without doing
anything useful. I'm not sure whether the behaviour before the commit was a
100% correct, either, because there actually is no selection with the given
atom on wayland and it can never be created. It might be that some features of
file-roller were not working correctly even before. Right now, file-roller has
just become unusable because it breaks sooner.


reproduce:
See the attached sample program which basically mimics what file-roller does.
Observe that with latest Gtk+ (with 0d30ad2 applied), the program will never
terminate in a wayland session (the effect in file-roller is that the UI is
unusable). Using GDK_BACKEND=x11 works, the program returns as expected. Using
any version before said commit also works.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>