[Wayland-bugs] [Bug 791081] gtk_widget_realize() throws In pixman_region32_init_rect: Invalid rectangle passed
gtk+ (GNOME Bugzilla)
bugzilla at gnome.org
Fri Dec 8 07:38:38 UTC 2017
https://bugzilla.gnome.org/show_bug.cgi?id=791081
--- Comment #8 from Olivier Fourdan <ofourdan at redhat.com> ---
(In reply to Martin Stransky from comment #6)
> (In reply to Matthias Clasen from comment #5)
> > 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).
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();
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-bugs/attachments/20171208/7ebac42f/attachment-0001.html>
More information about the wayland-bugs
mailing list