First, almost all widgets are either visible and mapped, or visible and unmapped because they are !child_visible. In both cases, we do care about the size. If they are indeed invisible, gtk_widget_measure() will take care of that by returning all 0. And gtk_widget_unparent() already queues a resize on the parent if necessary, so that is unneeded as well.