<html>
    <head>
      <base href="https://bugzilla.gnome.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - gtk_widget_realize() throws In pixman_region32_init_rect: Invalid rectangle passed"
   href="https://bugzilla.gnome.org/show_bug.cgi?id=791081#c8">Comment # 8</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - gtk_widget_realize() throws In pixman_region32_init_rect: Invalid rectangle passed"
   href="https://bugzilla.gnome.org/show_bug.cgi?id=791081">bug 791081</a>
              from <span class="vcard"><a href="page.cgi?id=describeuser.html&login=ofourdan%40redhat.com" title="Olivier Fourdan <ofourdan@redhat.com>"> <span class="fn">Olivier Fourdan</span></a>
</span></b>
        <pre>(In reply to Martin Stransky from <a href="show_bug.cgi?id=791081#c6">comment #6</a>)
<span class="quote">> (In reply to Matthias Clasen from <a href="show_bug.cgi?id=791081#c5">comment #5</a>)
> > I'm not really in favor of adding code to save the skin of people who
> > gtk_window_resize (w, 1, 1) - at some point, we have to rely on common sense
> > to prevail...

> It's not the (1,1) size only but any size smaller than CSD shadow size.
> Which is 50 x 50 pixels on my system (Fedora 27).</span >

Yes, but you'll notice the resize ther eis usless and doesn;t give you the
expected size of 1x1 anyway.

The following would work, i.e. avoid the negative window size *and* get you the
requested size:

    gtk_init(&argc, &argv);

    window = gtk_window_new(GTK_WINDOW_TOPLEVEL);

    gtk_widget_realize(window);
    gdk_flush();

    gtk_widget_unrealize(window);
    gtk_window_set_titlebar(GTK_WINDOW(window), gtk_fixed_new());
    gtk_window_resize(GTK_WINDOW(window), 1, 1);
    gtk_widget_realize(window);

    gtk_widget_show_all(window);
    gtk_main();</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>