forked from AuroraMiddleware/gtk
Bug 573087 – gdkwindow.c: {x,y}_offset used uninitialized
2009-03-02 Alexander Larsson <alexl@redhat.com> Bug 573087 – gdkwindow.c: {x,y}_offset used uninitialized * gdk/gdkwindow.c (gdk_window_clear_backing_rect_redirect): Don't use uninitialized vars. Fix offsets for redirected pixmap, draw to pixmap not window. svn path=/trunk/; revision=22441
This commit is contained in:
parent
01a8d2214a
commit
f4090b5c84
@ -1,3 +1,11 @@
|
||||
2009-03-02 Alexander Larsson <alexl@redhat.com>
|
||||
|
||||
Bug 573087 – gdkwindow.c: {x,y}_offset used uninitialized
|
||||
|
||||
* gdk/gdkwindow.c (gdk_window_clear_backing_rect_redirect):
|
||||
Don't use uninitialized vars.
|
||||
Fix offsets for redirected pixmap, draw to pixmap not window.
|
||||
|
||||
2009-03-02 Theppitak Karoonboonyanan <thep@linux.thai.net>
|
||||
|
||||
Bug 457086 - numpad does not work when the Thai-Lao input method is
|
||||
|
@ -2116,8 +2116,8 @@ gdk_window_clear_backing_rect_redirect (GdkWindow *window,
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
return;
|
||||
|
||||
paint.x_offset = x_offset;
|
||||
paint.y_offset = y_offset;
|
||||
paint.x_offset = 0;
|
||||
paint.y_offset = 0;
|
||||
paint.pixmap = redirect->pixmap;
|
||||
paint.surface = _gdk_drawable_ref_cairo_surface (redirect->pixmap);
|
||||
|
||||
@ -2125,10 +2125,19 @@ gdk_window_clear_backing_rect_redirect (GdkWindow *window,
|
||||
GDK_WINDOW (redirect->redirected),
|
||||
NULL, TRUE,
|
||||
&x_offset, &y_offset);
|
||||
|
||||
/* offset is from redirected window origin to window origin, convert to
|
||||
the offset from the redirected pixmap origin to the window origin */
|
||||
x_offset += redirect->dest_x - redirect->src_x;
|
||||
y_offset += redirect->dest_y - redirect->src_y;
|
||||
|
||||
/* Convert region and rect to pixmap coords */
|
||||
gdk_region_offset (clip_region, x_offset, y_offset);
|
||||
x += x_offset;
|
||||
y += y_offset;
|
||||
|
||||
method.cr = NULL;
|
||||
method.gc = NULL;
|
||||
setup_backing_rect_method (&method, window, &paint, 0, 0);
|
||||
setup_backing_rect_method (&method, window, &paint, -x_offset, -y_offset);
|
||||
|
||||
if (method.cr)
|
||||
{
|
||||
@ -2147,7 +2156,7 @@ gdk_window_clear_backing_rect_redirect (GdkWindow *window,
|
||||
g_assert (method.gc != NULL);
|
||||
|
||||
gdk_gc_set_clip_region (method.gc, clip_region);
|
||||
gdk_draw_rectangle (window, method.gc, TRUE, x, y, width, height);
|
||||
gdk_draw_rectangle (redirect->pixmap, method.gc, TRUE, x, y, width, height);
|
||||
g_object_unref (method.gc);
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user