ALT Linux Bugzilla
– Attachment 4458 Details for
Bug 23770
при прокрутке изображение не перерисовывается, если окно частично закрыто (+патч)
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
patch1 - using gdk_window_scroll instead of "manual" scrolling
0001-pixbuf-renderer-use-gdk_window_scroll.patch (text/plain), 2.74 KB, created by
Vladislav Zavjalov
on 2010-07-14 14:54:25 MSD
(
hide
)
Description:
patch1 - using gdk_window_scroll instead of "manual" scrolling
Filename:
MIME Type:
Creator:
Vladislav Zavjalov
Created:
2010-07-14 14:54:25 MSD
Size:
2.74 KB
patch
obsolete
>From 1cb100dd6b3ae4567131cf804a251cac7eac7068 Mon Sep 17 00:00:00 2001 >From: Vladislav Zavjalov <slazav@altlinux.org> >Date: Wed, 14 Jul 2010 04:20:59 +0400 >Subject: [PATCH] pixbuf-renderer: use gdk_window_scroll > >--- > gqview/src/pixbuf-renderer.c | 86 +----------------------------------------- > 1 files changed, 2 insertions(+), 84 deletions(-) > >diff --git a/gqview/src/pixbuf-renderer.c b/gqview/src/pixbuf-renderer.c >index 99d947e..b873010 100644 >--- a/gqview/src/pixbuf-renderer.c >+++ b/gqview/src/pixbuf-renderer.c >@@ -2833,7 +2833,6 @@ void pixbuf_renderer_scroll(PixbufRenderer *pr, gint x, gint y) > { > gint old_x, old_y; > gint x_off, y_off; >- gint w, h; > > g_return_if_fail(IS_PIXBUF_RENDERER(pr)); > >@@ -2853,90 +2852,9 @@ void pixbuf_renderer_scroll(PixbufRenderer *pr, gint x, gint y) > x_off = pr->x_scroll - old_x; > y_off = pr->y_scroll - old_y; > >- w = pr->vis_width - abs(x_off); >- h = pr->vis_height - abs(y_off); >- >- if (w < 1 || h < 1) >- { >- /* scrolled completely to new material */ >- pr_queue(pr, 0, 0, pr->width, pr->height, TRUE, TILE_RENDER_ALL, FALSE, FALSE); >- return; >- } >- else >- { >- gint x1, y1; >- gint x2, y2; >- GtkWidget *box; >- GdkGC *gc; >- GdkEvent *event; >- >- if (x_off < 0) >- { >- x1 = abs(x_off); >- x2 = 0; >- } >- else >- { >- x1 = 0; >- x2 = abs(x_off); >- } >- >- if (y_off < 0) >- { >- y1 = abs(y_off); >- y2 = 0; >- } >- else >- { >- y1 = 0; >- y2 = abs(y_off); >- } >+ gdk_window_scroll( >+ gtk_widget_get_window(GTK_WIDGET(pr)), -x_off, -y_off); > >- box = GTK_WIDGET(pr); >- >- gc = gdk_gc_new(box->window); >- gdk_gc_set_exposures(gc, TRUE); >- gdk_draw_drawable(box->window, gc, >- box->window, >- x2 + pr->x_offset, y2 + pr->y_offset, >- x1 + pr->x_offset, y1 + pr->y_offset, w, h); >- g_object_unref(gc); >- >- if (pr->overlay_list) >- { >- pr_overlay_queue_all(pr); >- } >- >- w = pr->vis_width - w; >- h = pr->vis_height - h; >- >- if (w > 0) >- { >- pr_queue(pr, >- x_off > 0 ? pr->x_scroll + (pr->vis_width - w) : pr->x_scroll, pr->y_scroll, >- w, pr->vis_height, TRUE, TILE_RENDER_ALL, FALSE, FALSE); >- } >- if (h > 0) >- { >- /* FIXME, to optimize this, remove overlap */ >- pr_queue(pr, >- pr->x_scroll, y_off > 0 ? pr->y_scroll + (pr->vis_height - h) : pr->y_scroll, >- pr->vis_width, h, TRUE, TILE_RENDER_ALL, FALSE, FALSE); >- } >- >- /* process exposures here, "expose_event" seems to miss a few with obstructed windows */ >- while ((event = gdk_event_get_graphics_expose(box->window)) != NULL) >- { >- pixbuf_renderer_paint(pr, &event->expose.area); >- >- if (event->expose.count == 0) >- { >- gdk_event_free(event); >- break; >- } >- gdk_event_free(event); >- } >- } > } > > void pixbuf_renderer_scroll_to_point(PixbufRenderer *pr, gint x, gint y, >-- >1.6.5.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 23770
: 4458 |
4459