<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 - GdkWindow does not always unref all GdkFrameClockIdle it creates"
   href="https://bugzilla.gnome.org/show_bug.cgi?id=775470">775470</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>GdkWindow does not always unref all GdkFrameClockIdle it creates
          </td>
        </tr>

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

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

        <tr>
          <th>Version</th>
          <td>3.22.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>sixtysix@inwind.it
          </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>After setting GOBJECT_DEBUG=objects comparing the outputs
of the following program run with ITERATIONS set to 2 and 1:

#include <gtk/gtk.h>

#ifndef ITERATIONS
#define ITERATIONS 1
#endif

int
main (int   argc,
      char *argv[])
{
  if (gtk_init_check (&argc, &argv))
    {
      int i;
      for (i = 0; i < ITERATIONS; ++i)
        {
          GtkWidget *dialog;
          dialog = gtk_file_chooser_dialog_new ("Open File",
                                                NULL,
                                                GTK_FILE_CHOOSER_ACTION_OPEN,
                                                "Cancel", GTK_RESPONSE_CANCEL,
                                                NULL);
          gtk_widget_show_all (dialog);
          gtk_widget_destroy (dialog);
        }
    }

  return 0;
}

on Wayland the number of objects alive at exit increases for the 
presence of few GdkFrameClockIdle objects.

The problem is that on Wayland popover GdkWindow have window_type
GDK_WINDOW_SUBSURFACE

<a href="https://git.gnome.org/browse/gtk+/tree/gtk/gtkwindow.c?h=gtk-3-22#n6647">https://git.gnome.org/browse/gtk+/tree/gtk/gtkwindow.c?h=gtk-3-22#n6647</a>

and gdk_window_destroy (_gdk_window_destroy_hierarchy) does nearly nothing
for this kind of GdkWindow:

<a href="https://git.gnome.org/browse/gtk+/tree/gdk/gdkwindow.c?h=gtk-3-22#n2019">https://git.gnome.org/browse/gtk+/tree/gdk/gdkwindow.c?h=gtk-3-22#n2019</a>

in particular it does not unref GdkFrameClockIdle objects it
creates.</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>