GNOME Bugzilla – Bug 588436
images not displayed correctly in f-spot since 2.17.3, csw issue?
Last modified: 2009-08-25 10:34:54 UTC
* run f-spot * click on the edit or fullscreen buttons * the image is not displayed as expected using gtk 2.17.2 everything works correctly
*** Bug 588435 has been marked as a duplicate of this bug. ***
the grid of images is displayed correctly but double clicking on one lead to random bits of images to be on screen where an image should be displayed only, the fullscreen mode doesn't display anything and is displayed as a blank dialog in the alt-tab list too
the issue is still there in 2.27.4
*** Bug 588933 has been marked as a duplicate of this bug. ***
Bug confirmed
*** This bug has been marked as a duplicate of 588553 ***
the fullscreen option is still buggy in 2.17.6
With latest git master f-spot fullscreen mode works fine here, can you test that?
the issue is still there using git master and compiz
Sebastien tried with metacity and couldn't reproduce there, so this is somehow related to how compiz does fullscreening.
When going fullscreen on a WM that supports _NET_WM_WINDOW_OPACITY f-spot uses it to start a fade-in of the fullscreened window. This code looks for the MAPPED events and then sets opacity to 0. Then it waits for a expose event on the toplevel and when it gets that it starts the fade-in. It turns out that with the CSW gtk+ we never get any expose event on the toplevel window. I'm not sure *exactly* why it gets one in pre-csw, but with csw the child windows overlap the toplevel fully so that the expose region for the toplevel is empty, and in csw we never send empty expose events. The following hack fixes f-spot: diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c index 8706608..cea4cad 100644 --- a/gdk/gdkwindow.c +++ b/gdk/gdkwindow.c @@ -4806,7 +4806,7 @@ _gdk_window_process_updates_recurse (GdkWindow *window, g_list_foreach (children, (GFunc)g_object_unref, NULL); g_list_free (children); - if (!gdk_region_empty (expose_region)) + if (1||!gdk_region_empty (expose_region)) { if (private->event_mask & GDK_EXPOSURE_MASK) { Not sure what is best to do here. The workaround will send one extra (empty) expose event on almost every window expose.
this is no longer an issue on f-spot.
I looked a bit deeper at this, and it turns out that the fullscreen window does have a child widget (FImageView) that is the full size of the toplevel window and thus covers everything. In the case of non-csw what happens is that initially the child widget is not size allocated yet, so we get an expose event on the toplevel for the parts that are not covered by the child, but we also get a configure event for the toplevel causing a size allocate and then resizing the child window. With CSW all the painting are delayed until we have size allocated etc, and by then we use the final window positions to calculate which windows get events, and this does not include the toplevel. So, we draw less and smarter, but the smarter behaviour is causing this change in behaviour. I belive that even without CSW this code can fail in some cases, for instance for toplevels smaller than 200x200 (which is the initial size of the child widgets in my tests). And, given that f-spot has been fixed I'm gonna close this as not a bug. However, from a f-spot kind of view I'd say that waiting for an expose event is the right thing to do, so that you never show a partially or not drawn window. However, you need to listen to that event on the photo view widget, not on the toplevel window.