When blitting inside one window, use ScrollWindowEx, and call

* gdk/win32/gdkdraw.c (gdk_draw_pixmap): When blitting inside one
	window, use ScrollWindowEx, and call UpdateWindow. This prevents
	bugs when for instance part of the window was outside the
	display. Thanks to Philippe Colantoni for finding and fixing this.
This commit is contained in:
Tor Lillqvist 1999-08-17 17:47:14 +00:00
parent f29407afe8
commit 70372ba8bd
9 changed files with 91 additions and 0 deletions

View File

@ -1,3 +1,10 @@
1999-08-17 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkdraw.c (gdk_draw_pixmap): When blitting inside one
window, use ScrollWindowEx, and call UpdateWindow. This prevents
bugs when for instance part of the window was outside the
display. Thanks to Philippe Colantoni for finding and fixing this.
1999-08-16 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkdraw.c (gdk_draw_arc): Fix start and end radial

View File

@ -1,3 +1,10 @@
1999-08-17 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkdraw.c (gdk_draw_pixmap): When blitting inside one
window, use ScrollWindowEx, and call UpdateWindow. This prevents
bugs when for instance part of the window was outside the
display. Thanks to Philippe Colantoni for finding and fixing this.
1999-08-16 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkdraw.c (gdk_draw_arc): Fix start and end radial

View File

@ -1,3 +1,10 @@
1999-08-17 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkdraw.c (gdk_draw_pixmap): When blitting inside one
window, use ScrollWindowEx, and call UpdateWindow. This prevents
bugs when for instance part of the window was outside the
display. Thanks to Philippe Colantoni for finding and fixing this.
1999-08-16 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkdraw.c (gdk_draw_arc): Fix start and end radial

View File

@ -1,3 +1,10 @@
1999-08-17 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkdraw.c (gdk_draw_pixmap): When blitting inside one
window, use ScrollWindowEx, and call UpdateWindow. This prevents
bugs when for instance part of the window was outside the
display. Thanks to Philippe Colantoni for finding and fixing this.
1999-08-16 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkdraw.c (gdk_draw_arc): Fix start and end radial

View File

@ -1,3 +1,10 @@
1999-08-17 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkdraw.c (gdk_draw_pixmap): When blitting inside one
window, use ScrollWindowEx, and call UpdateWindow. This prevents
bugs when for instance part of the window was outside the
display. Thanks to Philippe Colantoni for finding and fixing this.
1999-08-16 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkdraw.c (gdk_draw_arc): Fix start and end radial

View File

@ -1,3 +1,10 @@
1999-08-17 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkdraw.c (gdk_draw_pixmap): When blitting inside one
window, use ScrollWindowEx, and call UpdateWindow. This prevents
bugs when for instance part of the window was outside the
display. Thanks to Philippe Colantoni for finding and fixing this.
1999-08-16 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkdraw.c (gdk_draw_arc): Fix start and end radial

View File

@ -1,3 +1,10 @@
1999-08-17 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkdraw.c (gdk_draw_pixmap): When blitting inside one
window, use ScrollWindowEx, and call UpdateWindow. This prevents
bugs when for instance part of the window was outside the
display. Thanks to Philippe Colantoni for finding and fixing this.
1999-08-16 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkdraw.c (gdk_draw_arc): Fix start and end radial

View File

@ -560,9 +560,30 @@ gdk_draw_pixmap (GdkDrawable *drawable,
if ((srcdc = GetDC (src_private->xwindow)) == NULL)
g_warning ("gdk_draw_pixmap: GetDC failed");
#if 0
if (!BitBlt (hdc, xdest, ydest, width, height,
srcdc, xsrc, ysrc, SRCCOPY))
g_warning ("gdk_draw_pixmap: BitBlt failed");
#else
/* If we are in fact just blitting inside one window,
* ScrollWindowEx works better.
* Thanks to Philippe Colantoni <colanton@aris.ss.uci.edu>
* for noticing and fixing this.
*/
if (drawable_private->xwindow==src_private->xwindow)
{
if (!ScrollWindowEx (drawable_private->xwindow,-xsrc+xdest, -ysrc+ydest, NULL,
NULL, NULL, NULL, SW_INVALIDATE))
g_warning ("gdk_draw_pixmap: ScrollWindowEx failed");
if (!UpdateWindow (drawable_private->xwindow))
g_warning ("gdk_draw_pixmap: UpdateWindow failed");
}
else
if (!BitBlt (hdc, xdest, ydest, width, height,
srcdc, xsrc, ysrc, SRCCOPY))
g_warning ("gdk_draw_pixmap: BitBlt failed");
#endif
ReleaseDC (src_private->xwindow, srcdc);
}

View File

@ -560,9 +560,30 @@ gdk_draw_pixmap (GdkDrawable *drawable,
if ((srcdc = GetDC (src_private->xwindow)) == NULL)
g_warning ("gdk_draw_pixmap: GetDC failed");
#if 0
if (!BitBlt (hdc, xdest, ydest, width, height,
srcdc, xsrc, ysrc, SRCCOPY))
g_warning ("gdk_draw_pixmap: BitBlt failed");
#else
/* If we are in fact just blitting inside one window,
* ScrollWindowEx works better.
* Thanks to Philippe Colantoni <colanton@aris.ss.uci.edu>
* for noticing and fixing this.
*/
if (drawable_private->xwindow==src_private->xwindow)
{
if (!ScrollWindowEx (drawable_private->xwindow,-xsrc+xdest, -ysrc+ydest, NULL,
NULL, NULL, NULL, SW_INVALIDATE))
g_warning ("gdk_draw_pixmap: ScrollWindowEx failed");
if (!UpdateWindow (drawable_private->xwindow))
g_warning ("gdk_draw_pixmap: UpdateWindow failed");
}
else
if (!BitBlt (hdc, xdest, ydest, width, height,
srcdc, xsrc, ysrc, SRCCOPY))
g_warning ("gdk_draw_pixmap: BitBlt failed");
#endif
ReleaseDC (src_private->xwindow, srcdc);
}