GNOME Bugzilla – Bug 657936
Load progress not drawn after going to fullscreen
Last modified: 2011-09-01 16:50:05 UTC
If you go fullscreen and later open a new tab, you will notice that the page load progress is not drawn anymore (and a lot of warnings are thrown to the console as well). This was tricky to debug, but the issue is that EphyWindow is caching a pointer to the GtkEntry in location bar. When ephy goes fullscreen, the whole bar contents are destroyed (including the cached entry), making the GtkEntry pointer no longer valid. There are a few possibilities to solve this: 1) Add a weak pointer to the entry, so that the cache becomes NULL when the entry is destroyed and recreate the cache when needed (in every method accessing it). 2) Do not cache the entry at all and fetch it from the toolbar always when needed. 3) Add a signal to the toolbar that gets triggered every time the toolbar is changed or recreated or something similar. This would probably need to go into EggEditableToolbar and seems a bit overkill. I am implementing something along the lines of (1), since it seems reasonably simple for such a use case.
Created attachment 195395 [details] [review] EphyWindow: Fix location entry's load progress The caching of the GtkEntry was broken, since the toolbar items are destroyed on switching to/from fullscreen. Ensure the cache is correct by adding a weak pointer to the GtkEntry object and updating the cache when needed.
Created attachment 195402 [details] [review] EphyWindow: Fix location entry's load progress The caching of the GtkEntry was broken, since the toolbar items are destroyed on switching to/from fullscreen. Update the cache right after toolbar is rebuilt.
Review of attachment 195402 [details] [review]: I like this.
My pleasure! Attachment 195402 [details] pushed as 996bf1d - EphyWindow: Fix location entry's load progress