<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 - gdk_device_get_source: assertion 'GDK_IS_DEVICE (device)' failed"
   href="https://bugzilla.gnome.org/show_bug.cgi?id=753185">753185</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>gdk_device_get_source: assertion 'GDK_IS_DEVICE (device)' failed
          </td>
        </tr>

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

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

        <tr>
          <th>Version</th>
          <td>unspecified
          </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>carlosg@gnome.org
          </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>On wayland we may destroy the "master" pointer/keyboard devices right when we
receive a wl_seat.capability event, despite the events that might be queued for
these at that time.

This is visible on tty switch, mutter will first send the key release for the
ctrl/alt modifiers, gtk+ queues these events, but destroys the devices
immediately after. The focused window will then spawn several:

Gdk-CRITICAL **: gdk_device_get_source: assertion 'GDK_IS_DEVICE (device)'
failed

Triggered when the GtkGesture generic event handling code receives the event.

This didn't use to trigger on X11 because VCP/VCK are not removed, only the
slave devices are, although if we had performed any checks on the source
devices, we would surely have received warnings as well.

I'm attaching a patch that makes the private device/source_device event fields
refcounted, so the events at least contain valid GdkDevices when processed.</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>