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 588169 - evince index rendering problem
evince index rendering problem
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
csw
: 588057 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-07-09 16:05 UTC by Matthias Clasen
Modified: 2009-07-10 22:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot (106.81 KB, image/png)
2009-07-09 16:05 UTC, Matthias Clasen
Details

Description Matthias Clasen 2009-07-09 16:05:16 UTC
While going through a pdf with page-down, the index sidebar does not update correctly. csw problem, I'd say.
Comment 1 Matthias Clasen 2009-07-09 16:05:47 UTC
Created attachment 138127 [details]
screenshot
Comment 2 Alexander Larsson 2009-07-10 13:37:16 UTC
Yeah, looks like a gdk_window_scroll issue.
Comment 3 Björn Lindqvist 2009-07-10 16:29:25 UTC
I have the same issue when scrolling in my app which is an image
viewer.

To scroll the image, I use gdk_draw_drawable and then I repaint the
newly exposed areas using gdk_draw_pixbuf. It seems like the exposed
pixels from gdk_draw_pixbuf just isn't put on the GdkWindow. The
scrolled pixels are fine though. So I get drawing errors using this
code:

    gdk_draw_pixbuf (drawable,
                     NULL,
                     cache->last_pixbuf,
                     deltax, deltay,
                     opts->widget_x, opts->widget_y,
                     this.width, this.height,
                     GDK_RGB_DITHER_MAX,
                     opts->widget_x, opts->widget_y);

but not using this almost equivalent code that directly calls
gdk_draw_rgb_image_dithalign:

    GdkGC *gc = gdk_gc_new (drawable);
    GdkPixbuf *pb = cache->last_pixbuf;
    int rowstride = gdk_pixbuf_get_rowstride (pb);
    guchar *buf = gdk_pixbuf_get_pixels (pb) +
        deltay * rowstride +
        deltax * 3;
    gdk_draw_rgb_image_dithalign (drawable, gc,
                                  opts->widget_x, opts->widget_y,
                                  this.width, this.height,
                                  GDK_RGB_DITHER_MAX,
                                  buf, rowstride,
                                  opts->widget_x, opts->widget_y);
    g_object_unref (gc);


Comment 4 Alexander Larsson 2009-07-10 17:56:46 UTC
Can you try reverting these two commits:
52e3d2cf0e848d8956a6091c68b6d382cbbf4eb6
2678a454e5447ba28cf1aa7c316a1e73b7b30018
Comment 5 Alexander Larsson 2009-07-10 22:44:14 UTC
This was a weird one, it turns out the list view is in a notebook which also has a iconview which is not visible. When the icon view gets the page change it scrolls, calling gdk_window_scroll on the icon view window.

the scroll code checks to see if the window is mapped before copying anything, but this check fails because the icon view is mapped, while its parent is not. Checking for viewable rather than mapped fixed this.

Fixed in git.
Comment 6 Alexander Larsson 2009-07-10 22:45:09 UTC
*** Bug 588057 has been marked as a duplicate of this bug. ***