GNOME Bugzilla – Bug 700185
GtkWindow: problem with child widget visibility
Last modified: 2013-05-31 10:19:32 UTC
Created attachment 243925 [details] Simple test program to reproduce the bug Take a GtkWindow with a visible child widget. Show the window: the child widget is visible, alright. Hide the window and re-show it: the child widget is now hidden instead of being visible. This regression has been introduced during the 3.6 -> 3.8 cycle I think, and still exists in gtk+ master.
works correctly here, with both 3.8 and master.
Created attachment 245355 [details] python example Another example using pygobject: - execute script - click button - popup window shows with label - click again - popup window hides - click again EXPECTED: - window shows again with label ACTUAL RESULT: - window shows but is empty NOTE: this seems to work in Gnome Shell, but not with metacity or in xfce Tested with debian sid and arch linux
Created attachment 245356 [details] python example typo... Also I forgot: Calling widget.unrealize() after widget.hide() seems to fix it.
Indeed, I use Xfce and the bug still occurs with an updated gtk+ master. Xfce 4.8 on Debian testing. With GTK+ 3.4 from Debian, the bug doesn't occur.
97ba4b1b8eb82563f13762a4bd8cfe9beb8a121c is the first bad commit commit 97ba4b1b8eb82563f13762a4bd8cfe9beb8a121c Author: Benjamin Otte <otte@redhat.com> Date: Mon Jan 14 17:59:31 2013 +0100 window: Don't use set_allocation() to store cached values The window size can be queried on widget->window directly, no need to store it in widget->allocation. This change is necessary because gtk_widget_set_allcation() is now checking invariants that assume it's called from insize gtk_widget_size_allocate() and that wasn;t the case here.
t 4e50596b37eb6747656c24fc53ed42c88e798cf5 Author: Benjamin Otte <otte@redhat.com> Date: Thu May 30 19:28:08 2013 +0200 window: Call size_allocate() to allocate a size Don't call gtk_container_resize_children().
I confirm that the bug is fixed on Xfce (both the gtk-3-8 and master branches). Thanks!