mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 14:10:30 +00:00
widget: Re-shuffle preconditions in snapshot_child()
The GtkNative type check is more expensive than the mapped one, so avoid the former for unmapped widgets
This commit is contained in:
parent
461497e8d4
commit
203bb42cc1
@ -12045,10 +12045,10 @@ gtk_widget_snapshot_child (GtkWidget *widget,
|
|||||||
g_return_if_fail (_gtk_widget_get_parent (child) == widget);
|
g_return_if_fail (_gtk_widget_get_parent (child) == widget);
|
||||||
g_return_if_fail (snapshot != NULL);
|
g_return_if_fail (snapshot != NULL);
|
||||||
|
|
||||||
if (GTK_IS_NATIVE (child))
|
if (!_gtk_widget_get_mapped (child))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!_gtk_widget_get_mapped (child))
|
if (GTK_IS_NATIVE (child))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
gtk_widget_do_snapshot (child, snapshot);
|
gtk_widget_do_snapshot (child, snapshot);
|
||||||
|
Loading…
Reference in New Issue
Block a user