After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 588436 - images not displayed correctly in f-spot since 2.17.3, csw issue?
images not displayed correctly in f-spot since 2.17.3, csw issue?
Status: RESOLVED NOTABUG
Product: gtk+
Classification: Platform
Component: Backend: X11
2.17.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
csw
: 588435 588933 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-07-13 09:44 UTC by Sebastien Bacher
Modified: 2009-08-25 10:34 UTC
See Also:
GNOME target: ---
GNOME version: 2.27/2.28



Description Sebastien Bacher 2009-07-13 09:44:27 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
Comment 1 Sebastien Bacher 2009-07-13 09:44:51 UTC
*** Bug 588435 has been marked as a duplicate of this bug. ***
Comment 2 Sebastien Bacher 2009-07-13 09:47:20 UTC
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
Comment 3 Sebastien Bacher 2009-07-13 09:54:00 UTC
the issue is still there in 2.27.4
Comment 4 Baptiste Mille-Mathias 2009-07-20 18:09:41 UTC
*** Bug 588933 has been marked as a duplicate of this bug. ***
Comment 5 Baptiste Mille-Mathias 2009-07-20 18:10:06 UTC
Bug confirmed
Comment 6 Alexander Larsson 2009-07-23 20:46:24 UTC

*** This bug has been marked as a duplicate of 588553 ***
Comment 7 Sebastien Bacher 2009-07-27 10:03:20 UTC
the fullscreen option is still buggy in 2.17.6
Comment 8 Alexander Larsson 2009-08-11 10:40:17 UTC
With latest git master f-spot fullscreen mode works fine here, can you test that?
Comment 9 Sebastien Bacher 2009-08-11 13:10:53 UTC
the issue is still there using git master and compiz
Comment 10 Alexander Larsson 2009-08-11 15:08:03 UTC
Sebastien tried with metacity and couldn't reproduce there, so this is somehow related to how compiz does fullscreening.
Comment 11 Alexander Larsson 2009-08-18 10:09:39 UTC
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.
Comment 12 Stephane Delcroix 2009-08-24 15:16:27 UTC
this is no longer an issue on f-spot.
Comment 13 Alexander Larsson 2009-08-25 10:34:54 UTC
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.